-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore blank lines between comments when counting newlines-after-impo…
…rts (#7607) ## Summary Given: ```python # -*- coding: utf-8 -*- import random # Defaults for arguments are defined here # args.threshold = None; logger = logging.getLogger("FastProject") ``` We want to count the number of newlines after `import random`, to ensure that there's _at least one_, but up to two. Previously, we used the end range of the statement (then skipped trivia); instead, we need to use the end of the _last comment_. This is similar to #7556. Closes #7604.
- Loading branch information
1 parent
8bfe9bd
commit 5174e8c
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters