[pre-commit.ci] pre-commit autoupdate (#422)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
pre-commit-ci[bot] 2024-10-30 08:03:00 -07:00 committed by GitHub
parent 4768464512
commit 1d20129940
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 7 additions and 7 deletions

View File

@ -20,11 +20,11 @@ repos:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.4.3"
rev: "v2.4.3"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.0"
rev: "v0.7.1"
hooks:
- id: ruff-format
- id: ruff

View File

@ -120,7 +120,7 @@ def render_duplicated_dist_metadata_text(
print( # noqa: T201
(
f" {dist.metadata['Name']:<32} {dist.version:<16} (using {first_seen.version},"
f" \"{first_seen.locate_file('')}\")"
f' "{first_seen.locate_file("")}")'
),
file=sys.stderr,
)

View File

@ -50,7 +50,7 @@ class Package(ABC):
if len(license_strs) == 0:
return self.UNKNOWN_LICENSE_STR
return f'({", ".join(license_strs)})'
return f"({', '.join(license_strs)})"
@abstractmethod
def render_as_root(self, *, frozen: bool) -> str:

View File

@ -77,7 +77,7 @@ def fake_dist(tmp_path: Path) -> Path:
fake_dist_path.mkdir(parents=True)
fake_metadata = Path(fake_dist_path) / "METADATA"
with fake_metadata.open("w", encoding=locale.getpreferredencoding(False)) as f:
f.write("Metadata-Version: 2.3\n" "Name: bar\n" "Version: 2.4.5\n")
f.write("Metadata-Version: 2.3\nName: bar\nVersion: 2.4.5\n")
return fake_dist_path

View File

@ -24,7 +24,7 @@ def test_local_only(tmp_path: Path, mocker: MockerFixture, capfd: pytest.Capture
fake_dist.mkdir()
fake_metadata = Path(fake_dist) / "METADATA"
with fake_metadata.open("w") as f:
f.write("Metadata-Version: 2.3\n" "Name: foo\n" "Version: 1.2.5\n")
f.write("Metadata-Version: 2.3\nName: foo\nVersion: 1.2.5\n")
cmd = [str(result.creator.exe.parent / "python3"), "--local-only"]
mocker.patch("pipdeptree._discovery.sys.prefix", venv_path)

View File

@ -147,7 +147,7 @@ def test_custom_interpreter_ensure_pythonpath_envar_is_honored(
fake_dist.mkdir(parents=True)
fake_metadata = fake_dist / "METADATA"
with fake_metadata.open("w") as f:
f.write("Metadata-Version: 2.3\n" "Name: foo\n" "Version: 1.2.3\n")
f.write("Metadata-Version: 2.3\nName: foo\nVersion: 1.2.3\n")
cmd = ["", f"--python={result.creator.exe}", "--all", "--depth", "0"]
mocker.patch("pipdeptree._discovery.sys.argv", cmd)
monkeypatch.setenv("PYTHONPATH", str(another_path))