Skip to content
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/pipdeptree/_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/pipdeptree/_models/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def licenses(self) -> str:
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:
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_non_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down