From a93018e12e4992fa3a6d8ebd053c5d3aae70659e Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 20 Jul 2024 22:23:41 +0200 Subject: [PATCH] fix ruff --- astroid/builder.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/astroid/builder.py b/astroid/builder.py index cff859124e..932b461fa5 100644 --- a/astroid/builder.py +++ b/astroid/builder.py @@ -246,10 +246,7 @@ def delayed_assattr(self, node: nodes.AssignAttr) -> None: try: # pylint: disable=unidiomatic-typecheck # We want a narrow check on the # parent type, not all of its subclasses - if ( - type(inferred) == bases.Instance - or type(inferred) == objects.ExceptionInstance - ): + if type(inferred) in {bases.Instance, objects.ExceptionInstance}: inferred = inferred._proxied iattrs = inferred.instance_attrs if not _can_assign_attr(inferred, node.attrname):