[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:
parent
4768464512
commit
1d20129940
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue