Skip to content

Commit

Permalink
Add some pylint disables
Browse files Browse the repository at this point in the history
This is used towork around some invalid-name issue
and cyclic import issue which seems to be a bug in pylint

Signed-off-by: Urvashi Mohnani <[email protected]>
  • Loading branch information
umohnani8 committed Nov 7, 2023
1 parent e74fea2 commit c053f7e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion podman/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import requests
from requests.adapters import HTTPAdapter

from podman import api
from podman import api # pylint: disable=cyclic-import
from podman.api.ssh import SSHAdapter
from podman.api.uds import UDSAdapter
from podman.errors import APIError, NotFound
Expand Down
1 change: 1 addition & 0 deletions podman/api/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def connect(self) -> None:
class SSHConnectionPool(urllib3.HTTPConnectionPool):
"""Specialized HTTPConnectionPool for holding SSH connections."""

# pylint: disable=invalid-name
ConnectionCls = SSHConnection


Expand Down
1 change: 1 addition & 0 deletions podman/api/uds.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def connect(self) -> None:
class UDSConnectionPool(urllib3.HTTPConnectionPool):
"""Specialization of HTTPConnectionPool for holding UNIX domain sockets."""

# pylint: disable=invalid-name
ConnectionCls = UDSConnection


Expand Down
5 changes: 2 additions & 3 deletions podman/errors/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
"""Podman API Errors."""

import typing
from typing import Iterable, List, Optional, Union
from typing import Iterable, List, Optional, Union, TYPE_CHECKING

from requests import Response
from requests.exceptions import HTTPError

# Break circular import
if typing.TYPE_CHECKING:
if TYPE_CHECKING:
from podman.domain.containers import Container
from podman.api.client import APIResponse

Expand Down

0 comments on commit c053f7e

Please sign in to comment.