File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -986,16 +986,16 @@ def analyze_overloaded_func_def(self, defn: OverloadedFuncDef) -> None:
986
986
# We know this is an overload def. Infer properties and perform some checks.
987
987
self .process_final_in_overload (defn )
988
988
self .process_static_or_class_method_in_overload (defn )
989
- if defn .impl :
990
- self .process_overload_impl (defn )
989
+ self .process_overload_impl (defn )
991
990
992
991
def process_overload_impl (self , defn : OverloadedFuncDef ) -> None :
993
992
"""Set flags for an overload implementation.
994
993
995
994
Currently, this checks for a trivial body in protocols classes,
996
995
where it makes the method implicitly abstract.
997
996
"""
998
- assert defn .impl is not None
997
+ if defn .impl is None :
998
+ return
999
999
impl = defn .impl if isinstance (defn .impl , FuncDef ) else defn .impl .func
1000
1000
if is_trivial_body (impl .body ) and self .is_class_scope () and not self .is_stub_file :
1001
1001
assert self .type is not None
You can’t perform that action at this time.
0 commit comments