-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Allow 2 spaces after an import block #119
Comments
Hi @dwaynebailey, Thanks for pointing out this area for improvement. Currently, isort does add 2 lines if it sees the next item code construct is a class, decorator, or function - but one line otherwise. To fix the issue you are facing I plan on adding a "lines_after_import" option, that when set to a number of new lines will force this number independent to the code construct that follows. Thanks! Timothy |
Thanks for reporting this issue, it has been fixed in version 3.5.0 with the addition of the 'lines_after_imports' setting. ~Timothy |
Thanks for all these changes. Tested and seems to be working great. |
@timothycrosley if sys.version > (3, 8):
import xxx
class Abc:
... In this example, I would like to have |
While PEP8 is unclear about how many lines after the import block it does say this:
"Separate top-level function and class definitions with two blank lines."
So in our code we add two lines after imports to closely match our high level double line breaks.
This probably isn't what other people do so being able to set the blank line following an import block would be a good option
The text was updated successfully, but these errors were encountered: