Skip to content

Commit fa0ee31

Browse files
authored
Merge pull request #9504 from sbidoul/improve-pre-commit-sbi
Better way to run slow linters in CI only
2 parents f84e576 + fe3aec0 commit fa0ee31

File tree

6 files changed

+14
-19
lines changed

6 files changed

+14
-19
lines changed

.pre-commit-config-slow.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ exclude: 'src/pip/_vendor/'
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.2.0
5+
rev: v3.4.0
66
hooks:
77
- id: check-builtin-literals
88
- id: check-added-large-files
@@ -53,7 +53,7 @@ repos:
5353
5454
5555
- repo: https://gitlab.com/pycqa/flake8
56-
rev: 3.8.3
56+
rev: 3.8.4
5757
hooks:
5858
- id: flake8
5959
additional_dependencies: [
@@ -63,20 +63,20 @@ repos:
6363
exclude: tests/data
6464

6565
- repo: https://github.com/PyCQA/isort
66-
rev: 5.5.3
66+
rev: 5.7.0
6767
hooks:
6868
- id: isort
6969
files: \.py$
7070

7171
- repo: https://github.com/pre-commit/mirrors-mypy
72-
rev: v0.790
72+
rev: v0.800
7373
hooks:
7474
- id: mypy
7575
exclude: docs|tests
7676
args: ["--pretty"]
7777

7878
- repo: https://github.com/pre-commit/pygrep-hooks
79-
rev: v1.6.0
79+
rev: v1.7.0
8080
hooks:
8181
- id: python-no-log-warn
8282
- id: python-no-eval
@@ -93,3 +93,9 @@ repos:
9393
entry: NEWS fragment files must be named *.(process|removal|feature|bugfix|vendor|doc|trivial).rst
9494
exclude: ^news/(.gitignore|.*\.(process|removal|feature|bugfix|vendor|doc|trivial).rst)
9595
files: ^news/
96+
97+
- repo: https://github.com/mgedmin/check-manifest
98+
rev: '0.46'
99+
hooks:
100+
- id: check-manifest
101+
stages: [manual]

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ exclude .appveyor.yml
1717
exclude .travis.yml
1818
exclude .readthedocs.yml
1919
exclude .pre-commit-config.yaml
20-
exclude .pre-commit-config-slow.yaml
2120
exclude tox.ini
2221
exclude noxfile.py
2322

noxfile.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,9 @@ def lint(session):
147147
args = session.posargs + ["--all-files"]
148148
else:
149149
args = ["--all-files", "--show-diff-on-failure"]
150+
args.append("--hook-stage=manual")
150151

151152
session.run("pre-commit", "run", *args)
152-
session.run(
153-
"pre-commit", "run", "-c", ".pre-commit-config-slow.yaml", *args
154-
)
155153

156154

157155
@nox.session

src/pip/_internal/locations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import site
99
import sys
1010
import sysconfig
11-
from distutils.command.install import SCHEME_KEYS # type: ignore
11+
from distutils.command.install import SCHEME_KEYS
1212
from distutils.command.install import install as distutils_install_command
1313

1414
from pip._internal.models.scheme import Scheme

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ skip_install = True
6363
commands_pre =
6464
deps = pre-commit
6565
commands =
66-
pre-commit run [] --all-files --show-diff-on-failure
67-
pre-commit run [] -c .pre-commit-config-slow.yaml --all-files --show-diff-on-failure
66+
pre-commit run [] --all-files --show-diff-on-failure --hook-stage=manual
6867

6968
[testenv:vendoring]
7069
basepython = python3

0 commit comments

Comments
 (0)