-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support lint ignore directives in more places
Adds logic to `LintRule.node_comments()` looking for directives in more locations relative to the current node: - trailing inline comments after commas - preceding and trailing comments inside brackets - preceding comments before/after decorators for classes and functions In addition, to better support suppressions for decorators themselves, the logic to break upward searching until reaching a `leading_lines` node has been modified to exclude `Decorator` nodes which have their own leading lines that aren't used for the first decorator on a class. Based on code examples reported in #413 ghstack-source-id: 4907870d9ecde15fd1110b3d276bc7f95569c513 Pull Request resolved: #441
- Loading branch information
Showing
2 changed files
with
36 additions
and
4 deletions.
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