ruff/crates/ruff_python_semantic/src/analyze
Adrian 4ebd0bd31e
Support local and dynamic class- and static-method decorators (#8592)
## Summary

This brings ruff's behavior in line with what `pep8-naming` already does
and thus closes #8397.

I had initially implemented this to look at the last segment of a dotted
path only when the entry in the `*-decorators` setting started with a
`.`, but in the end I thought it's better to remain consistent w/
`pep8-naming` and doing a match against the last segment of the
decorator name in any case.

If you prefer to diverge from this in favor of less ambiguity in the
configuration let me know and I'll change it so you would need to put
e.g. `.expression` in the `classmethod-decorators` list.

## Test Plan

Tested against the file in the issue linked below, plus the new testcase
added in this PR.
2023-11-10 02:04:25 +00:00
..
function_type.rs Support local and dynamic class- and static-method decorators (#8592) 2023-11-10 02:04:25 +00:00
logging.rs Allow capitalized names for logger candidate heuristic match (#6356) 2023-08-04 23:25:34 +00:00
mod.rs Add branch detection to the semantic model (#6694) 2023-08-19 21:28:17 +00:00
type_inference.rs Split Constant to individual literal nodes (#8064) 2023-10-30 12:13:23 +05:30
typing.rs Improve detection of TYPE_CHECKING blocks imported from typing_extensions or _typeshed (#8429) 2023-11-09 12:21:03 -06:00
visibility.rs [pylint] Implement too-many-public-methods rule (PLR0904) (#6179) 2023-09-14 00:52:26 +00:00