Skip to content

Commit

Permalink
Upgrade mypy, fix associated failures
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Sep 5, 2023
1 parent e9ad77e commit 35cd621
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 41 deletions.
2 changes: 1 addition & 1 deletion accounts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class RelateUserMethodSettingsInitializer:
and initialize the settings for csv export for csv-related forms.
"""

def __init__(self):
def __init__(self) -> None:
self._custom_full_name_method = None
self._email_appellation_priority_list = (
DEFAULT_EMAIL_APPELLATION_PRIORITY_LIST)
Expand Down
9 changes: 5 additions & 4 deletions course/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -1181,10 +1181,11 @@ class APIError(Exception):


def find_matching_token(
course_identifier: str = None,
token_id: int = None,
token_hash_str: str = None,
now_datetime: datetime.datetime = None) -> Optional[AuthenticationToken]:
course_identifier: Optional[str] = None,
token_id: Optional[int] = None,
token_hash_str: Optional[str] = None,
now_datetime: Optional[datetime.datetime] = None
) -> Optional[AuthenticationToken]:
try:
token = AuthenticationToken.objects.get(
id=token_id,
Expand Down
2 changes: 1 addition & 1 deletion course/page/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def markup_to_html(
page_context: PageContext,
text: str,
use_jinja: bool = True,
reverse_func: Callable = None,
reverse_func: Optional[Callable] = None,
) -> str:
from course.content import markup_to_html as mth

Expand Down
71 changes: 37 additions & 34 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ flake8-bugbear = "^22.1.11"
flake8-comprehensions = "^3.10.1"
flake8 = "^6.0"
pep8-naming = "^0.10.0"
mypy = "^0.981"
mypy = "^1"
pytest = "^6.2.5"
pytest-django = "^4.4.0"
pytest-factoryboy = "^2.1.0"
Expand Down

0 comments on commit 35cd621

Please sign in to comment.