Skip to content
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

Improve naming for logger instance #155

Merged
merged 1 commit into from
Jan 16, 2025
Merged
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
8 changes: 4 additions & 4 deletions src/tox_uv/_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import logging
from collections import defaultdict
from collections.abc import Sequence
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, Final

from packaging.requirements import Requirement
from packaging.utils import parse_sdist_filename, parse_wheel_filename
Expand All @@ -22,7 +22,7 @@
from tox.tox_env.python.api import Python


logger = logging.getLogger(__name__)
_LOGGER: Final[logging.Logger] = logging.getLogger(__name__)


class UvInstaller(Pip):
Expand Down Expand Up @@ -91,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
logger.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 @@ -115,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
logger.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
Loading