ruff/crates/ruff_workspace/src
Steve C 78e26cec02
[flake8-bugbear] Implement class-as-data-structure (B903) (#9601)
## Summary

Adds `class-as-data-structure` rule (`B903`). Also compare pylint's `too-few-public-methods` (`PLR0903`).

Took some creative liberty with this by allowing the class to have any
decorators or base classes. There are years-old issues on pylint that
don't approve of the strictness when it comes to these things.

Especially considering that dataclass is a decorator and namedtuple _can
be_ a base class. I feel ignoring those explicitly is redundant all
things considered, but it's not a hill I'm willing to die on!

See: #970 

## Test Plan

`cargo test`

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
Co-authored-by: dylwil3 <dylwil3@gmail.com>
2025-01-06 21:18:28 -06:00
..
configuration.rs [flake8-bugbear] Implement class-as-data-structure (B903) (#9601) 2025-01-06 21:18:28 -06:00
lib.rs Add most formatter options to ruff.toml / pyproject.toml (#7566) 2023-09-22 15:47:57 +00:00
options.rs [flake8-type-checking] Improve flexibility of runtime-evaluated-decorators (#15204) 2024-12-31 16:28:10 +00:00
options_base.rs Better error message when --config is given a table key and a non-inline-table value (#15266) 2025-01-06 13:20:28 +00:00
pyproject.rs Fix configuration inheritance for configurations specified in the LSP settings (#13285) 2024-09-09 19:46:39 +01:00
resolver.rs Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
settings.rs Add a subcommand to generate dependency graphs (#13402) 2024-09-19 21:06:32 -04:00