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 @@ -813,16 +813,16 @@ def analyze_overloaded_func_def(self, defn: OverloadedFuncDef) -> None:
813
813
# We know this is an overload def. Infer properties and perform some checks.
814
814
self .process_final_in_overload (defn )
815
815
self .process_static_or_class_method_in_overload (defn )
816
- if defn .impl :
817
- self .process_overload_impl (defn )
816
+ self .process_overload_impl (defn )
818
817
819
818
def process_overload_impl (self , defn : OverloadedFuncDef ) -> None :
820
819
"""Set flags for an overload implementation.
821
820
822
821
Currently, this checks for a trivial body in protocols classes,
823
822
where it makes the method implicitly abstract.
824
823
"""
825
- assert defn .impl is not None
824
+ if defn .impl is None :
825
+ return
826
826
impl = defn .impl if isinstance (defn .impl , FuncDef ) else defn .impl .func
827
827
if is_trivial_body (impl .body ) and self .is_class_scope () and not self .is_stub_file :
828
828
assert self .type is not None
You can’t perform that action at this time.
0 commit comments