ruff/crates/ruff_linter
Charlie Marsh 12b5c3a54c
[flake8-bugbear] Ignore enum classes in cached-instance-method (B019) (#11312)
## Summary

While I was here, I also updated the rule to use
`function_type::classify` rather than hard-coding `staticmethod` and
friends.

Per Carl:

> Enum instances are already referred to by the class, forming a cycle
that won't get collected until the class itself does. At which point the
`lru_cache` itself would be collected, too.

Closes https://github.com/astral-sh/ruff/issues/9912.
2024-05-06 14:19:22 -04:00
..
resources [flake8-bugbear] Ignore enum classes in cached-instance-method (B019) (#11312) 2024-05-06 14:19:22 -04:00
src [flake8-bugbear] Ignore enum classes in cached-instance-method (B019) (#11312) 2024-05-06 14:19:22 -04:00
__init__.py [pylint] (Re-)Implement import-private-name (C2701) (#9553) 2024-01-16 14:03:11 -05:00
Cargo.toml Bump version to v0.4.3 (#11274) 2024-05-03 18:48:31 -04:00