File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -4895,15 +4895,18 @@ def infer_context_dependent(
48954895 return typ
48964896
48974897 @staticmethod
4898- def is_notimplemented (t : ProperType ) -> Type :
4898+ def is_notimplemented (t : ProperType ) -> bool :
48994899 return isinstance (t , Instance ) and t .type .fullname == "builtins._NotImplementedType"
49004900
49014901 @classmethod
4902- def erase_notimplemented (cls , t : ProperType ) -> Type :
4902+ def erase_notimplemented (cls , t : Type ) -> Type :
4903+ t = get_proper_type (t )
49034904 if cls .is_notimplemented (t ):
49044905 return AnyType (TypeOfAny .special_form )
49054906 if isinstance (t , UnionType ):
4906- return UnionType .make_union ([i for i in t .items if not cls .is_notimplemented (i )])
4907+ return UnionType .make_union (
4908+ [i for i in t .items if not cls .is_notimplemented (get_proper_type (i ))]
4909+ )
49074910 return t
49084911
49094912 def check_return_stmt (self , s : ReturnStmt ) -> None :
You can’t perform that action at this time.
0 commit comments