Skip to content

Commit

Permalink
Make mypy pass on black in knot_benchmark (#13235)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood committed Sep 4, 2024
1 parent 9d1bd7a commit 5728909
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions scripts/knot_benchmark/src/benchmark/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ def install(self, dependencies: list[str]):
"--python",
self.python,
"--quiet",
# We pass `--exclude-newer` to ensure that type-checking of one of
# our projects isn't unexpectedly broken by a change in the
# annotations of one of that project's dependencies
"--exclude-newer",
"2024-09-03T00:00:00Z",
*dependencies,
]

Expand Down
8 changes: 6 additions & 2 deletions scripts/knot_benchmark/src/benchmark/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ class Project(typing.NamedTuple):
revision: str

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

include: list[str] = []
"""The directories and files to check. If empty, checks the current directory"""
Expand Down Expand Up @@ -96,7 +100,7 @@ def clone(self, checkout_dir: Path):
Project(
name="black",
repository="https://github.com/psf/black",
revision="c20423249e9d8dfb8581eebbfc67a13984ee45e9",
revision="ac28187bf4a4ac159651c73d3a50fe6d0f653eac",
include=["src"],
dependencies=[
"aiohttp",
Expand Down

0 comments on commit 5728909

Please sign in to comment.