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
|
# FBT001: Boolean positional arg in function definition
|
||||||
def foo(self, value: bool) -> None:
|
def foo(self, value: bool) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def foo(self) -> None:
|
||||||
|
object.__setattr__(self, "flag", True)
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ pub(super) const FUNC_CALL_NAME_ALLOWLIST: &[&str] = &[
|
||||||
"pop",
|
"pop",
|
||||||
"remove",
|
"remove",
|
||||||
"setattr",
|
"setattr",
|
||||||
|
"__setattr__",
|
||||||
"setdefault",
|
"setdefault",
|
||||||
"str",
|
"str",
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue