We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ruff 0.1.13
from dataclasses import dataclass, field @dataclass(frozen=True) class Foo: a: int b: int c: int = field(init=False) def __post_init__(self) -> None: object.__setattr__(self, "c", self.a + self.b)
the __setattr__ trick is necessary because the dataclass is frozen, but:
__setattr__
PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
via #9166 presumably
looks like y'all went round this once already at #4752...
The text was updated successfully, but these errors were encountered:
IMO all instances of object dunder calls should be allowed considering they're so common (would likely prevent a third round of this issue :)).
object
Sorry, something went wrong.
I believe this is fixed on main, and in v0.1.14 https://play.ruff.rs/73935842-d2c6-4b42-b5de-545c9a5be633.
object.__setattr__
No branches or pull requests
ruff 0.1.13
the
__setattr__
trick is necessary because the dataclass is frozen, but:via #9166 presumably
looks like y'all went round this once already at #4752...
The text was updated successfully, but these errors were encountered: