mirror of https://github.com/astral-sh/ruff
Ignore __setattr__ in FBT003 (#4752)
This commit is contained in:
parent
6c1ff6a85f
commit
c1286d61df
|
|
@ -80,3 +80,6 @@ class Registry:
|
|||
# FBT001: Boolean positional arg in function definition
|
||||
def foo(self, value: bool) -> None:
|
||||
pass
|
||||
|
||||
def foo(self) -> None:
|
||||
object.__setattr__(self, "flag", True)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ pub(super) const FUNC_CALL_NAME_ALLOWLIST: &[&str] = &[
|
|||
"pop",
|
||||
"remove",
|
||||
"setattr",
|
||||
"__setattr__",
|
||||
"setdefault",
|
||||
"str",
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue