diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0b033f3..22f21130 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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' diff --git a/src/packaging/specifiers.py b/src/packaging/specifiers.py index e715ecc8..8f1e181f 100644 --- a/src/packaging/specifiers.py +++ b/src/packaging/specifiers.py @@ -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. diff --git a/src/packaging/tags.py b/src/packaging/tags.py index 19ccbde3..14bf982b 100644 --- a/src/packaging/tags.py +++ b/src/packaging/tags.py @@ -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