Skip to content

Commit

Permalink
Upgrade to latest mypy (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja authored Jan 17, 2023
1 parent 068a0b5 commit 1b9da44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.950
rev: v0.991
hooks:
- id: mypy
exclude: '^(docs|tasks|tests)|setup\.py'
Expand Down
3 changes: 2 additions & 1 deletion src/packaging/specifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
# Store whether or not this Specifier should accept prereleases
self._prereleases = prereleases

@property
# https://github.com/python/mypy/pull/13475#pullrequestreview-1079784515
@property # type: ignore[override]
def prereleases(self) -> bool:
# If there is an explicit prereleases set for this, then we'll just
# blindly use that.
Expand Down
2 changes: 1 addition & 1 deletion src/packaging/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def parse_tag(tag: str) -> FrozenSet[Tag]:


def _get_config_var(name: str, warn: bool = False) -> Union[int, str, None]:
value = sysconfig.get_config_var(name)
value: Union[int, str, None] = sysconfig.get_config_var(name)
if value is None and warn:
logger.debug(
"Config variable '%s' is unset, Python ABI tag may be incorrect", name
Expand Down

0 comments on commit 1b9da44

Please sign in to comment.