Skip to content

Commit

Permalink
Use logger instance instead of ruff (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Nov 18, 2024
1 parent 1ffe857 commit 82825c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.3"
rev: "v0.7.4"
hooks:
- id: ruff-format
- id: ruff
Expand Down
7 changes: 5 additions & 2 deletions src/tox_uv/_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
from tox.tox_env.python.api import Python


logger = logging.getLogger(__name__)


class UvInstaller(Pip):
"""Pip is a python installer that can install packages as defined by PEP-508 and PEP-517."""

Expand Down Expand Up @@ -88,7 +91,7 @@ def install(self, arguments: Any, section: str, of_type: str) -> None: # noqa:
elif isinstance(arguments, Sequence): # pragma: no branch
self._install_list_of_deps(arguments, section, of_type)
else: # pragma: no cover
logging.warning("uv cannot install %r", arguments) # pragma: no cover
logger.warning("uv cannot install %r", arguments) # pragma: no cover
raise SystemExit(1) # pragma: no cover

def _install_list_of_deps( # noqa: C901
Expand All @@ -112,7 +115,7 @@ def _install_list_of_deps( # noqa: C901
groups["req"].extend(str(i) for i in arg.deps)
groups["dev_pkg"].append(str(arg.path))
else: # pragma: no branch
logging.warning("uv install %r", arg) # pragma: no cover
logger.warning("uv install %r", arg) # pragma: no cover
raise SystemExit(1) # pragma: no cover
req_of_type = f"{of_type}_deps" if groups["pkg"] or groups["dev_pkg"] else of_type
for value in groups.values():
Expand Down

0 comments on commit 82825c8

Please sign in to comment.