mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 12:55:05 +00:00
![]() ## 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> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |