Ignore __setattr__ in FBT003 (#4752)

This commit is contained in:
Alex Fikl 2023-05-31 17:36:19 +03:00 committed by GitHub
parent 6c1ff6a85f
commit c1286d61df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -28,6 +28,7 @@ pub(super) const FUNC_CALL_NAME_ALLOWLIST: &[&str] = &[
"pop",
"remove",
"setattr",
"__setattr__",
"setdefault",
"str",
];