Skip to content

Commit

Permalink
Fix "Missing return statement"
Browse files Browse the repository at this point in the history
  • Loading branch information
intgr committed Nov 15, 2022
1 parent 627927e commit 7127d70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mypy_django_plugin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ def get_customize_class_mro_hook(self, fullname: str) -> Optional[Callable[[Clas
and sym.node.has_base(fullnames.BASE_MANAGER_CLASS_FULLNAME)
):
return reparametrize_any_manager_hook
else:
return None

def get_base_class_hook(self, fullname: str) -> Optional[Callable[[ClassDefContext], None]]:
# Base class is a Model class definition
Expand Down Expand Up @@ -309,6 +311,8 @@ def get_type_analyze_hook(self, fullname: str) -> Optional[Callable[[AnalyzeType
"django_stubs_ext.annotations.WithAnnotations",
):
return partial(handle_annotated_type, django_context=self.django_context)
else:
return None

def get_dynamic_class_hook(self, fullname: str) -> Optional[Callable[[DynamicClassDefContext], None]]:
# Create a new manager class definition when a manager's '.from_queryset' classmethod is called
Expand Down

0 comments on commit 7127d70

Please sign in to comment.