Skip to content

[pre-commit.ci] pre-commit autoupdate #354

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

Merged
merged 3 commits into from
Apr 16, 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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.12.1"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.5"
rev: "v0.3.7"
hooks:
- id: ruff-format
- id: ruff
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 @@ -193,7 +193,7 @@ def render_as_root(self, *, frozen: bool) -> str:

def render_as_branch(self, *, frozen: bool) -> str:
if not frozen:
req_ver = self.version_spec if self.version_spec else "Any"
req_ver = self.version_spec or "Any"
return f"{self.project_name} [required: {req_ver}, installed: {self.installed_version}]"
return self.render_as_root(frozen=frozen)

Expand Down
4 changes: 2 additions & 2 deletions src/pipdeptree/_render/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def aux( # noqa: PLR0913, PLR0917
# Without this extra space, bullets will point to the space just before the project name
prefix += " " if use_bullets else ""
next_prefix = prefix
node_str = prefix + bullet + node_str
node_str = prefix + bullet + node_str # noqa: PLR6104
elif include_license:
node_str += " " + node.licenses()

Expand Down Expand Up @@ -138,7 +138,7 @@ def aux(
node_str = node.render(parent, frozen=frozen)
if parent:
prefix = " " * indent + ("- " if use_bullets else "")
node_str = prefix + node_str
node_str = prefix + node_str # noqa: PLR6104
elif include_license:
node_str += " " + node.licenses()
result = [node_str]
Expand Down