File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
astroid/nodes/scoped_nodes Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1775,7 +1775,7 @@ def _class_type(
17751775 klass : ClassDef ,
17761776 ancestors : set [str ] | None = None ,
17771777 context : InferenceContext | None = None ,
1778- ):
1778+ ) -> Literal [ "class" , "exception" , "metaclass" ] :
17791779 """return a ClassDef node type to differ metaclass and exception
17801780 from 'regular' classes
17811781 """
@@ -1798,7 +1798,7 @@ def _class_type(
17981798 for base in klass .ancestors (recurs = False ):
17991799 name = _class_type (base , ancestors )
18001800 if name != "class" :
1801- if name == "metaclass" and not _is_metaclass ( klass ) :
1801+ if name == "metaclass" and klass . _type != "metaclass" :
18021802 # don't propagate it if the current class
18031803 # can't be a metaclass
18041804 continue
You can’t perform that action at this time.
0 commit comments