ruff/crates/ruff_linter/resources/test/fixtures/flake8_bugbear
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
..
B002.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B003.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B004.py Improve handling of builtin symbols in linter rules (#10919) 2024-04-16 11:37:31 +01:00
B005.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B006_1.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B006_2.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B006_3.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B006_4.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B006_5.py Ensure that B006 autofixes are inserted after imports (#7629) 2023-09-27 01:26:29 +00:00
B006_6.py Ensure that B006 autofixes are inserted after imports (#7629) 2023-09-27 01:26:29 +00:00
B006_7.py Ensure that B006 autofixes are inserted after imports (#7629) 2023-09-27 01:26:29 +00:00
B006_8.py [`flake8-bugbear`] Treat `raise NotImplemented`-only bodies as stub functions (#10990) 2024-04-17 14:06:40 +00:00
B006_B008.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B006_extended.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B007.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B008_extended.py Resolve classes and functions relative to script name (#10965) 2024-04-18 01:42:50 +00:00
B009_B010.py Improve handling of builtin symbols in linter rules (#10919) 2024-04-16 11:37:31 +01:00
B011.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B012.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B013.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B014.py Insert necessary padding in B014 fixes (#7699) 2023-09-28 21:11:09 +00:00
B015.ipynb Avoid `B015`,`B018` for last expression in a cell (#8815) 2023-11-22 15:33:23 +00:00
B015.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B016.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B017.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B018.ipynb Avoid `B015`,`B018` for last expression in a cell (#8815) 2023-11-22 15:33:23 +00:00
B018.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B019.py [`flake8-bugbear`] Ignore enum classes in `cached-instance-method` (`B019`) (#11312) 2024-05-06 14:19:22 -04:00
B020.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B021.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B022.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B023.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B024.py Ignore non-abstract class attributes when enforcing B024 (#11210) 2024-04-30 09:01:08 -07:00
B025.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B026.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B027.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B027.pyi Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B028.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B029.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B030.py [`flake8-bugbear`] Allow tuples of exceptions (`B030`) (#10437) 2024-03-18 00:31:23 +00:00
B031.py [`flake8-bugbear`] Avoid false positive for usage after `continue` (`B031`) (#10539) 2024-03-25 00:38:30 +00:00
B032.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B033.py [`flake8-bugbear`] Add fix for `duplicate-value` (`B033`) (#9510) 2024-01-14 23:20:16 +00:00
B034.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B035.py Recategorize `static-key-dict-comprehension` from `RUF011` to `B035` (#9428) 2024-02-01 13:35:02 -06:00
B904.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
B905.py Improve handling of builtin symbols in linter rules (#10919) 2024-04-16 11:37:31 +01:00
B909.py [`flake8-bugbear`] Implement `loop-iterator-mutation` (`B909`) (#9578) 2024-04-11 19:52:52 +00:00