Skip to content

Commit b44d406

Browse files
authored
CM-31598 - Use absolute imports instead of relative ones (#201)
1 parent 2c1bc35 commit b44d406

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

cycode/cyclient/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .config import logger
1+
from cycode.cyclient.config import logger
22

33
__all__ = [
44
'logger',

cycode/cyclient/auth_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
from requests import Response
44

55
from cycode.cli.exceptions.custom_exceptions import HttpUnauthorizedError, NetworkError
6-
7-
from . import models
8-
from .cycode_client import CycodeClient
6+
from cycode.cyclient import models
7+
from cycode.cyclient.cycode_client import CycodeClient
98

109

1110
class AuthClient:

cycode/cyclient/cycode_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from . import config
2-
from .cycode_client_base import CycodeClientBase
1+
from cycode.cyclient import config
2+
from cycode.cyclient.cycode_client_base import CycodeClientBase
33

44

55
class CycodeClient(CycodeClientBase):

cycode/cyclient/cycode_client_base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
from cycode import __version__
77
from cycode.cli.exceptions.custom_exceptions import HttpUnauthorizedError, NetworkError
88
from cycode.cli.user_settings.configuration_manager import ConfigurationManager
9-
from cycode.cyclient import logger
10-
11-
from . import config
9+
from cycode.cyclient import config, logger
1210

1311

1412
def get_cli_user_agent() -> str:

cycode/cyclient/cycode_dev_based_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Dict, Optional
22

3-
from .config import dev_tenant_id
4-
from .cycode_client_base import CycodeClientBase
3+
from cycode.cyclient.config import dev_tenant_id
4+
from cycode.cyclient.cycode_client_base import CycodeClientBase
55

66
"""
77
Send requests with api token

cycode/cyclient/scan_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from cycode.cyclient.cycode_client_base import CycodeClientBase
1111

1212
if TYPE_CHECKING:
13-
from .scan_config_base import ScanConfigBase
13+
from cycode.cyclient.scan_config_base import ScanConfigBase
1414

1515

1616
class ScanClient:

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ docstring-quotes = "double"
113113
multiline-quotes = "double"
114114
inline-quotes = "single"
115115

116+
[tool.ruff.lint.flake8-tidy-imports]
117+
ban-relative-imports = "all"
118+
116119
[tool.ruff.per-file-ignores]
117120
"tests/*.py" = ["S101", "S105"]
118121
"cycode/*.py" = ["BLE001"]

0 commit comments

Comments
 (0)