Skip to content

Commit a9f185a

Browse files
sobolevntushar-deepsource
authored andcommitted
Microrefactoring: no need to define possibly unused var in typeanal.py (python#11481)
1 parent 8c3854c commit a9f185a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/typeanal.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ def try_analyze_special_unbound_type(self, t: UnboundType, fullname: str) -> Opt
332332
# To prevent assignment of 'builtins.type' inferred as 'builtins.object'
333333
# See https://github.com/python/mypy/issues/9476 for more information
334334
return None
335-
type_str = 'Type[...]' if fullname == 'typing.Type' else 'type[...]'
336335
if len(t.args) != 1:
336+
type_str = 'Type[...]' if fullname == 'typing.Type' else 'type[...]'
337337
self.fail(type_str + ' must have exactly one type argument', t)
338338
item = self.anal_type(t.args[0])
339339
return TypeType.make_normalized(item, line=t.line)

0 commit comments

Comments
 (0)