Instagram / Fixit

Advanced Python linting framework with auto-fixes and hierarchical configuration that makes it easy to write custom in-repo lint rules.
https://fixit.rtfd.io/en/latest/
Other
659 stars 62 forks source link

Support lint ignore directives in more places #441

Closed amyreese closed 3 months ago

amyreese commented 3 months ago

Stack from ghstack (oldest at bottom):

Adds logic to LintRule.node_comments() looking for directives in more locations relative to the current node:

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