Skip to content

Commit

Permalink
Remove analyze_direct, no longer needed now that the metaclass is han…
Browse files Browse the repository at this point in the history
…dled.
  • Loading branch information
jaraco committed Oct 4, 2020
1 parent c0777db commit 4d75c8e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/mypy_zope/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,6 @@ def get_base_class_hook(
self, fullname: str
) -> Optional[Callable[[ClassDefContext], None]]:
# print(f"get_base_class_hook: {fullname}")
def analyze_direct(classdef_ctx: ClassDefContext) -> None:
self.log(f"Found zope interface: {classdef_ctx.cls.fullname}")
md = self._get_metadata(classdef_ctx.cls.info)
md["is_interface"] = True

def analyze_subinterface(classdef_ctx: ClassDefContext) -> None:
# If one of the bases is an interface, this is also an interface
if isinstance(classdef_ctx.reason, IndexExpr):
Expand Down Expand Up @@ -310,9 +305,6 @@ def analyze_subinterface(classdef_ctx: ClassDefContext) -> None:
cls_md = self._get_metadata(cls_info)
cls_md["is_interface"] = True

if fullname == "zope.interface.interface.Interface":
return analyze_direct

return analyze_subinterface

def get_customize_class_mro_hook(
Expand Down

0 comments on commit 4d75c8e

Please sign in to comment.