[ruff] Enable SIM rules and fix code simplification violations (#9872)
This commit is contained in:
1 parent
cb87f156d0
commit
ffebd30033
72 files changed
+400
-432
No files matched your search
@@ -1037,10 +1037,7 @@ class MockObjClass(MockObj):
|
||||
def inherits_from(self, other: "MockObjClass") -> bool:
|
||||
if str(self) == str(other):
|
||||
return True
|
||||
for parent in self._parents:
|
||||
if str(parent) == str(other):
|
||||
return True
|
||||
return False
|
||||
return any(str(parent) == str(other) for parent in self._parents)
|
||||
|
||||
def template(self, *args: SafeExpType) -> "MockObjClass":
|
||||
if len(args) != 1 or not isinstance(args[0], TemplateArguments):
|
||||
|
||||
Reference in new issue
Block a user