From 1574d88257e42f71a81bb78745e1bdbf5916706c Mon Sep 17 00:00:00 2001 From: Damian Shaw Date: Fri, 6 Jun 2025 22:03:15 -0400 Subject: [PATCH] Fix mypy 1.16.0 type hint errors --- .pre-commit-config.yaml | 2 +- src/pip/_internal/network/auth.py | 2 +- tests/lib/venv.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 88ed7491422..ea64a30e718 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,7 @@ repos: args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.15.0 + rev: v1.16.0 hooks: - id: mypy exclude: tests/data diff --git a/src/pip/_internal/network/auth.py b/src/pip/_internal/network/auth.py index 3b8d68ad14a..a42f7024c4c 100644 --- a/src/pip/_internal/network/auth.py +++ b/src/pip/_internal/network/auth.py @@ -230,7 +230,7 @@ def __init__( ) -> None: self.prompting = prompting self.index_urls = index_urls - self.keyring_provider = keyring_provider # type: ignore[assignment] + self.keyring_provider = keyring_provider self.passwords: dict[str, AuthInfo] = {} # When the user is prompted to enter credentials and keyring is # available, we will offer to save them. If the user accepts, diff --git a/tests/lib/venv.py b/tests/lib/venv.py index 56007610f61..35b3bf2c10d 100644 --- a/tests/lib/venv.py +++ b/tests/lib/venv.py @@ -226,7 +226,7 @@ def sitecustomize(self) -> str | None: return self._sitecustomize @sitecustomize.setter - def sitecustomize(self, value: str) -> None: + def sitecustomize(self, value: str | None) -> None: self._sitecustomize = value self._customize_site()