-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blank lines removed between Python function and special keywords #38
Comments
Yes, please ensure two blank lines between every toplevel item. |
great spot, i'd noticed this too and unhappy with it. @johanneskoester are you saying there should be two blank lines before |
I disagree that there should be two lines between a python function and
Should be
|
PEP8 states clearly "Surround top-level function and class definitions with two blank lines" and "Method definitions inside a class are surrounded by a single blank line". In the example above we are talking about a top level function, so I believe 2 blank lines are required between the end of the
|
Right you are. |
Yes, I agree, two blank lines feel right. |
Great. Thanks a lot for bringing this up @enixmail !
So the double spacing you suggested is in place. I'll keep this open for now as it might fuel more discussion. |
Note: this was ran from commit bbceeeb
It appears that blanks line are removed between the end of a Python function and special Snakemake keywords.
Given this Snakefile:
snakefmt
formats it this way:Shouldn't the 2 blank lines separating the
foo()
function and theworkdir
keyword be kept?Also, should the special handlers
onstart
,onsuccess
andonerror
be treated like rules and have 2 blank lines before and after?The text was updated successfully, but these errors were encountered: