You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just started using yapf with hopes for making easier the burden of code-cleanup.
I very much like the aesthetics of aligned comments when it comes to blocks of code, but having a list of values in spaces_before_comment kinda creates problems when I have blocks with comments on the side, as well as commented out lines.
I can imagine comments and commented out lines within a block are hard to distinguish programmatically, but is there something in yapf that would allow for not having the problem, where:
from torch.utils.data import DataLoader # this is an important comment
import numpy as np
# import torch
import matplotlib.pyplot as plt
# import sounddevice as sd
# import os
# import torchaudio
gets corrected to:
from torch.utils.data import DataLoader # this is an important comment
import numpy as np
# import torch
import matplotlib.pyplot as plt
# import sounddevice as sd
# import os
# import torchaudio
Thank you in advance!
The text was updated successfully, but these errors were encountered:
Hey all!
I've just started using yapf with hopes for making easier the burden of code-cleanup.
I very much like the aesthetics of aligned comments when it comes to blocks of code, but having a list of values in
spaces_before_comment
kinda creates problems when I have blocks with comments on the side, as well as commented out lines.I can imagine comments and commented out lines within a block are hard to distinguish programmatically, but is there something in yapf that would allow for not having the problem, where:
gets corrected to:
Thank you in advance!
The text was updated successfully, but these errors were encountered: