Skip to content

Commit 5728909

Browse files
authored
Make mypy pass on black in knot_benchmark (#13235)
1 parent 9d1bd7a commit 5728909

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

scripts/knot_benchmark/src/benchmark/cases.py

+5
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@ def install(self, dependencies: list[str]):
204204
"--python",
205205
self.python,
206206
"--quiet",
207+
# We pass `--exclude-newer` to ensure that type-checking of one of
208+
# our projects isn't unexpectedly broken by a change in the
209+
# annotations of one of that project's dependencies
210+
"--exclude-newer",
211+
"2024-09-03T00:00:00Z",
207212
*dependencies,
208213
]
209214

scripts/knot_benchmark/src/benchmark/projects.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ class Project(typing.NamedTuple):
1515
revision: str
1616

1717
dependencies: list[str]
18-
"""List of type checking dependencies"""
18+
"""List of type checking dependencies.
19+
20+
Dependencies are pinned using a `--exclude-newer` flag when installing them
21+
into the virtual environment; see the `Venv.install()` method for details.
22+
"""
1923

2024
include: list[str] = []
2125
"""The directories and files to check. If empty, checks the current directory"""
@@ -96,7 +100,7 @@ def clone(self, checkout_dir: Path):
96100
Project(
97101
name="black",
98102
repository="https://github.com/psf/black",
99-
revision="c20423249e9d8dfb8581eebbfc67a13984ee45e9",
103+
revision="ac28187bf4a4ac159651c73d3a50fe6d0f653eac",
100104
include=["src"],
101105
dependencies=[
102106
"aiohttp",

0 commit comments

Comments
 (0)