File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3318,13 +3318,17 @@ def check_assignment(
33183318 resolved_type = None
33193319
33203320 def can_resolve_partial (lvalue_type , proper_rvalue_type ):
3321- return lvalue_type .type is None and not isinstance (proper_rvalue_type , NoneType )
3321+ return lvalue_type .type is None and not isinstance (
3322+ proper_rvalue_type , NoneType
3323+ )
33223324
33233325 def set_node_type (lvalue , typ ):
33243326 if getattr (lvalue , "node" , None ) and hasattr (lvalue .node , "type" ):
33253327 lvalue .node .type = typ
33263328
3327- if isinstance (lvalue_type , PartialType ) and can_resolve_partial (lvalue_type , proper_rvalue_type ):
3329+ if isinstance (lvalue_type , PartialType ) and can_resolve_partial (
3330+ lvalue_type , proper_rvalue_type
3331+ ):
33283332 resolved_type = make_simplified_union ([proper_rvalue_type , NoneType ()])
33293333 elif lvalue_type .type is not None and isinstance (proper_rvalue_type , Instance ):
33303334 if rvalue_type .type == lvalue_type .type :
@@ -3339,7 +3343,7 @@ def set_node_type(lvalue, typ):
33393343 lvalue ,
33403344 )
33413345 return
3342-
3346+
33433347 else :
33443348 # Hacky special case for assigning a literal None
33453349 # to a variable defined in a previous if
You can’t perform that action at this time.
0 commit comments