From 4085eb023618a2a160b88b054c8a77b9a9cf6d17 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Fri, 22 Apr 2022 15:27:27 +0100 Subject: [PATCH 1/4] Update pre-commit hooks This makes the output easier to parse on failures in this. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 37a987b30dd..4819bd378c8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ exclude: 'src/pip/_vendor/' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.2.0 hooks: - id: check-builtin-literals - id: check-added-large-files From 208937c6ddaa1b61c4f9cefda71fd552092933f1 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Fri, 22 Apr 2022 16:09:12 +0100 Subject: [PATCH 2/4] Update the versions of pinned packages in pre-commit environments --- .pre-commit-config.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4819bd378c8..4d88637ffac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,9 +26,9 @@ repos: hooks: - id: flake8 additional_dependencies: [ - 'flake8-bugbear==20.1.4', + 'flake8-bugbear==22.3.23', 'flake8-logging-format==0.6.0', - 'flake8-implicit-str-concat==0.2.0', + 'flake8-implicit-str-concat==0.3.0', ] exclude: tests/data @@ -47,10 +47,11 @@ repos: additional_dependencies: [ 'keyring==23.0.1', 'nox==2021.6.12', - 'pytest==6.2.5', - 'types-docutils==0.1.8', - 'types-setuptools==57.0.2', - 'types-six==0.1.9', + 'pytest==7.1.1', + 'types-docutils==0.18.3', + 'types-setuptools==57.4.14', + 'types-freezegun==1.1.9', + 'types-six==1.16.15', ] - repo: https://github.com/pre-commit/pygrep-hooks From 840d54b5e2e6fd017bba3e3b828d3f6376d804ef Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Fri, 22 Apr 2022 16:13:09 +0100 Subject: [PATCH 3/4] Disable spurious flake8-bugbear warnings --- setup.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.cfg b/setup.cfg index ae6aa38d8b2..98f8a5f92c7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,6 +24,10 @@ extend-ignore = G200, G202, # black adds spaces around ':' E203, + # using a cache + B019, + # reassigning variables in a loop + B020, per-file-ignores = # G: The plugin logging-format treats every .log and .error as logging. noxfile.py: G From b68de249d1cd774cc4f8784743fa6f222769e1c1 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Fri, 22 Apr 2022 16:13:35 +0100 Subject: [PATCH 4/4] Remove a no-longer-needed `type: ignore` comment --- tests/unit/test_self_check_outdated.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_self_check_outdated.py b/tests/unit/test_self_check_outdated.py index d313f3fd019..d41de249e19 100644 --- a/tests/unit/test_self_check_outdated.py +++ b/tests/unit/test_self_check_outdated.py @@ -6,7 +6,7 @@ from typing import Any, Optional, cast from unittest import mock -import freezegun # type: ignore +import freezegun import pytest from pip._vendor.packaging.version import parse as parse_version