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.
Stack from ghstack (oldest at bottom):
442
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 excludeDecorator
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