Skip to content

Commit d4f70fb

Browse files
committed
Fix isinstance call with get_property_type
1 parent 8b94be8 commit d4f70fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypy/checkstrformat.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@ def perform_special_format_checks(
448448
call,
449449
code=codes.STRING_FORMATTING,
450450
)
451-
if isinstance(actual_type, NoneType):
451+
a_type = get_proper_type(actual_type)
452+
if isinstance(a_type, NoneType):
452453
# Perform type check of alignment specifiers on None
453454
if spec.format_spec and any(c in spec.format_spec for c in "<>^"):
454455
specifierIndex = -1

0 commit comments

Comments
 (0)