Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to latest mypy #664

Merged
merged 1 commit into from Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
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
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
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