diff --git a/hcloud/servers/client.py b/hcloud/servers/client.py index 5cbd48a..ea72851 100644 --- a/hcloud/servers/client.py +++ b/hcloud/servers/client.py @@ -9,8 +9,6 @@ from ..floating_ips import BoundFloatingIP from ..images import BoundImage, CreateImageResponse from ..isos import BoundIso -from ..networks import BoundNetwork # noqa -from ..networks import Network # noqa from ..placement_groups import BoundPlacementGroup from ..primary_ips import BoundPrimaryIP from ..server_types import BoundServerType @@ -35,6 +33,7 @@ from ..images import Image from ..isos import Iso from ..locations import BoundLocation, Location + from ..networks import BoundNetwork, Network from ..placement_groups import PlacementGroup from ..server_types import ServerType from ..ssh_keys import BoundSSHKey, SSHKey @@ -131,6 +130,9 @@ def __init__(self, client: ServersClient, data: dict, complete: bool = True): private_nets = data.get("private_net") if private_nets: + # pylint: disable=import-outside-toplevel + from ..networks import BoundNetwork + private_nets = [ PrivateNet( network=BoundNetwork( diff --git a/pyproject.toml b/pyproject.toml index 2b76834..60a7dd0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,9 +21,6 @@ jobs = 0 [tool.pylint.reports] output-format = "colorized" -[tool.pylint.basic] -good-names = ["i", "j", "k", "ex", "_", "ip", "id"] - [tool.pylint."messages control"] disable = [ "fixme", @@ -31,6 +28,7 @@ disable = [ "missing-class-docstring", "missing-module-docstring", "redefined-builtin", + "duplicate-code", # Consider disabling line-by-line "too-few-public-methods", "too-many-public-methods", diff --git a/setup.py b/setup.py index b4a20b6..ca2fa23 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ ], "test": [ "coverage>=7.3,<7.4", - "pylint>=2.17.4,<2.18", + "pylint>=3,<3.1", "pytest>=7.4,<7.5", "mypy>=1.5,<1.6", "types-python-dateutil",