Skip to content

Commit

Permalink
chore: run ruff formatter
Browse files Browse the repository at this point in the history
Signed-off-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
  • Loading branch information
Mr-Sunglasses committed Feb 16, 2025
1 parent 466890c commit cdbdf0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions podman/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,7 @@ def from_env(
"max_pool_size": max_pool_size,
}

host = (
environment.get("CONTAINER_HOST")
or environment.get("DOCKER_HOST")
or None
)
host = environment.get("CONTAINER_HOST") or environment.get("DOCKER_HOST") or None
if host is not None:
kwargs["base_url"] = host

Expand Down
1 change: 1 addition & 0 deletions podman/errors/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def __init__(
class InvalidArgument(PodmanError):
"""Parameter to method/function was not valid."""


class PodmanConnectionError(PodmanError):
"""Exception raised when connection to Podman service fails using environment configuration."""

Expand Down
2 changes: 1 addition & 1 deletion podman/tests/integration/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_login(self):
def test_from_env(self):
"""integration: from_env() no error"""
PodmanClient.from_env()

def test_from_env_exceptions(self):
"""integration: from_env() returns exceptions"""
with self.assertRaises(PodmanConnectionError):
Expand Down

0 comments on commit cdbdf0d

Please sign in to comment.