Skip to content

Commit

Permalink
Bump mypy version from 1.5.1 to 1.6.0 (#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r committed Oct 12, 2023
1 parent 5a295d4 commit c42b985
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repos:
exclude: ^(docs)

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.6.0
hooks:
- id: mypy
additional_dependencies: [types-all]
Expand Down
6 changes: 3 additions & 3 deletions holidays/holiday_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from datetime import date, datetime, timedelta, timezone
from gettext import NullTranslations, gettext, translation
from pathlib import Path
from typing import Any, Dict, Iterable, List, Mapping, Optional, Set, Tuple, Union, cast
from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Union, cast

from dateutil.parser import parse

Expand Down Expand Up @@ -381,7 +381,7 @@ def __contains__(self, key: object) -> bool:
if not isinstance(key, (date, datetime, float, int, str)):
raise TypeError(f"Cannot convert type '{type(key)}' to date.")

return dict.__contains__(cast("Mapping[Any, Any]", self), self.__keytransform__(key))
return dict.__contains__(cast("Dict[Any, Any]", self), self.__keytransform__(key))

def __eq__(self, other: object) -> bool:
if not isinstance(other, HolidayBase):
Expand All @@ -391,7 +391,7 @@ def __eq__(self, other: object) -> bool:
if getattr(self, attribute_name, None) != getattr(other, attribute_name, None):
return False

return dict.__eq__(cast("Mapping[Any, Any]", self), other)
return dict.__eq__(cast("Dict[Any, Any]", self), other)

def __getattr__(self, name):
try:
Expand Down

0 comments on commit c42b985

Please sign in to comment.