Skip to content

Commit adb9232

Browse files
committed
refactor: use type from inherited resource client property
1 parent 3b6c712 commit adb9232

16 files changed

Lines changed: 7 additions & 44 deletions

File tree

hcloud/certificates/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class CertificatesPageResult(NamedTuple):
104104

105105

106106
class CertificatesClient(ResourceClientBase):
107-
_client: Client
108107

109108
actions: ResourceActionsClient
110109
"""Certificates scoped actions client

hcloud/datacenters/client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, NamedTuple
3+
from typing import Any, NamedTuple
44

55
from ..core import BoundModelBase, Meta, ResourceClientBase
66
from ..locations import BoundLocation
77
from ..server_types import BoundServerType
88
from .domain import Datacenter, DatacenterServerTypes
99

10-
if TYPE_CHECKING:
11-
from .._client import Client
12-
1310

1411
class BoundDatacenter(BoundModelBase, Datacenter):
1512
_client: DatacentersClient
@@ -56,7 +53,6 @@ class DatacentersPageResult(NamedTuple):
5653

5754

5855
class DatacentersClient(ResourceClientBase):
59-
_client: Client
6056

6157
def get_by_id(self, id: int) -> BoundDatacenter:
6258
"""Get a specific datacenter by its ID.

hcloud/firewalls/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ class FirewallsPageResult(NamedTuple):
184184

185185

186186
class FirewallsClient(ResourceClientBase):
187-
_client: Client
188187

189188
actions: ResourceActionsClient
190189
"""Firewalls scoped actions client

hcloud/floating_ips/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ class FloatingIPsPageResult(NamedTuple):
140140

141141

142142
class FloatingIPsClient(ResourceClientBase):
143-
_client: Client
144143

145144
actions: ResourceActionsClient
146145
"""Floating IPs scoped actions client

hcloud/images/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ class ImagesPageResult(NamedTuple):
113113

114114

115115
class ImagesClient(ResourceClientBase):
116-
_client: Client
117116

118117
actions: ResourceActionsClient
119118
"""Images scoped actions client

hcloud/isos/client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, NamedTuple
3+
from typing import Any, NamedTuple
44

55
from ..core import BoundModelBase, Meta, ResourceClientBase
66
from .domain import Iso
77

8-
if TYPE_CHECKING:
9-
from .._client import Client
10-
118

129
class BoundIso(BoundModelBase, Iso):
1310
_client: IsosClient
@@ -21,7 +18,6 @@ class IsosPageResult(NamedTuple):
2118

2219

2320
class IsosClient(ResourceClientBase):
24-
_client: Client
2521

2622
def get_by_id(self, id: int) -> BoundIso:
2723
"""Get a specific ISO by its id

hcloud/load_balancer_types/client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, NamedTuple
3+
from typing import Any, NamedTuple
44

55
from ..core import BoundModelBase, Meta, ResourceClientBase
66
from .domain import LoadBalancerType
77

8-
if TYPE_CHECKING:
9-
from .._client import Client
10-
118

129
class BoundLoadBalancerType(BoundModelBase, LoadBalancerType):
1310
_client: LoadBalancerTypesClient
@@ -21,7 +18,6 @@ class LoadBalancerTypesPageResult(NamedTuple):
2118

2219

2320
class LoadBalancerTypesClient(ResourceClientBase):
24-
_client: Client
2521

2622
def get_by_id(self, id: int) -> BoundLoadBalancerType:
2723
"""Returns a specific Load Balancer Type.

hcloud/load_balancers/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ class LoadBalancersPageResult(NamedTuple):
370370

371371

372372
class LoadBalancersClient(ResourceClientBase):
373-
_client: Client
374373

375374
actions: ResourceActionsClient
376375
"""Load Balancers scoped actions client

hcloud/locations/client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, NamedTuple
3+
from typing import Any, NamedTuple
44

55
from ..core import BoundModelBase, Meta, ResourceClientBase
66
from .domain import Location
77

8-
if TYPE_CHECKING:
9-
from .._client import Client
10-
118

129
class BoundLocation(BoundModelBase, Location):
1310
_client: LocationsClient
@@ -21,7 +18,6 @@ class LocationsPageResult(NamedTuple):
2118

2219

2320
class LocationsClient(ResourceClientBase):
24-
_client: Client
2521

2622
def get_by_id(self, id: int) -> BoundLocation:
2723
"""Get a specific location by its ID.

hcloud/networks/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ class NetworksPageResult(NamedTuple):
167167

168168

169169
class NetworksClient(ResourceClientBase):
170-
_client: Client
171170

172171
actions: ResourceActionsClient
173172
"""Networks scoped actions client

0 commit comments

Comments
 (0)