Skip to content

Commit

Permalink
fix: mypy check
Browse files Browse the repository at this point in the history
  • Loading branch information
Hongbin Huang committed Nov 22, 2023
1 parent 255fc91 commit d52b92f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions easy/controller/meta_conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, List, Optional, Type, Union
from typing import Any, List, Optional, Type, Union

from django.db import models

Expand All @@ -24,7 +24,7 @@


class ModelOptions:
def __init__(self, options: Dict = None):
def __init__(self, options: Optional[object] = None):
"""
Configuration reader
"""
Expand Down
6 changes: 3 additions & 3 deletions easy/decorators.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from functools import wraps
from types import FunctionType
from typing import Any, Callable
from typing import Any, Callable, Optional
from urllib.parse import urlparse

from django.conf import settings
Expand All @@ -11,7 +11,7 @@

def request_passes_test(
test_func: Callable[[Any], Any],
login_url: str = None,
login_url: Optional[str] = None,
redirect_field_name: str = REDIRECT_FIELD_NAME,
) -> Callable[[FunctionType], Callable[[HttpRequest, Any], Any]]:
"""
Expand Down Expand Up @@ -45,7 +45,7 @@ def _wrapped_view(request: HttpRequest, *args: Any, **kwargs: Any) -> Any:


def docs_permission_required(
view_func: FunctionType = None,
view_func: Optional[FunctionType] = None,
redirect_field_name: str = REDIRECT_FIELD_NAME,
login_url: str = "admin:login",
) -> Any:
Expand Down

0 comments on commit d52b92f

Please sign in to comment.