Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make mypy pass on black in knot_benchmark #13235

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
AlexWaygood marked this conversation as resolved.
Show resolved Hide resolved
*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
Loading