Skip to content

Commit

Permalink
feat: add domain attribute type hints to bound models
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola committed Sep 20, 2023
1 parent f238c2e commit 0f8abbd
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion hcloud/actions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .._client import Client


class BoundAction(BoundModelBase):
class BoundAction(BoundModelBase, Action):
_client: ActionsClient

model = Action
Expand Down
2 changes: 1 addition & 1 deletion hcloud/certificates/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from .._client import Client


class BoundCertificate(BoundModelBase):
class BoundCertificate(BoundModelBase, Certificate):
_client: CertificatesClient

model = Certificate
Expand Down
2 changes: 1 addition & 1 deletion hcloud/datacenters/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .._client import Client


class BoundDatacenter(BoundModelBase):
class BoundDatacenter(BoundModelBase, Datacenter):
_client: DatacentersClient

model = Datacenter
Expand Down
2 changes: 1 addition & 1 deletion hcloud/firewalls/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .._client import Client


class BoundFirewall(BoundModelBase):
class BoundFirewall(BoundModelBase, Firewall):
_client: FirewallsClient

model = Firewall
Expand Down
2 changes: 1 addition & 1 deletion hcloud/floating_ips/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ..servers import BoundServer, Server


class BoundFloatingIP(BoundModelBase):
class BoundFloatingIP(BoundModelBase, FloatingIP):
_client: FloatingIPsClient

model = FloatingIP
Expand Down
2 changes: 1 addition & 1 deletion hcloud/images/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .._client import Client


class BoundImage(BoundModelBase):
class BoundImage(BoundModelBase, Image):
_client: ImagesClient

model = Image
Expand Down
2 changes: 1 addition & 1 deletion hcloud/isos/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .._client import Client


class BoundIso(BoundModelBase):
class BoundIso(BoundModelBase, Iso):
_client: IsosClient

model = Iso
Expand Down
2 changes: 1 addition & 1 deletion hcloud/load_balancer_types/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .._client import Client


class BoundLoadBalancerType(BoundModelBase):
class BoundLoadBalancerType(BoundModelBase, LoadBalancerType):
_client: LoadBalancerTypesClient

model = LoadBalancerType
Expand Down
2 changes: 1 addition & 1 deletion hcloud/load_balancers/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from ..networks import Network


class BoundLoadBalancer(BoundModelBase):
class BoundLoadBalancer(BoundModelBase, LoadBalancer):
_client: LoadBalancersClient

model = LoadBalancer
Expand Down
2 changes: 1 addition & 1 deletion hcloud/locations/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .._client import Client


class BoundLocation(BoundModelBase):
class BoundLocation(BoundModelBase, Location):
_client: LocationsClient

model = Location
Expand Down
2 changes: 1 addition & 1 deletion hcloud/networks/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .._client import Client


class BoundNetwork(BoundModelBase):
class BoundNetwork(BoundModelBase, Network):
_client: NetworksClient

model = Network
Expand Down
2 changes: 1 addition & 1 deletion hcloud/placement_groups/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .._client import Client


class BoundPlacementGroup(BoundModelBase):
class BoundPlacementGroup(BoundModelBase, PlacementGroup):
_client: PlacementGroupsClient

model = PlacementGroup
Expand Down
2 changes: 1 addition & 1 deletion hcloud/primary_ips/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ..datacenters import BoundDatacenter, Datacenter


class BoundPrimaryIP(BoundModelBase):
class BoundPrimaryIP(BoundModelBase, PrimaryIP):
_client: PrimaryIPsClient

model = PrimaryIP
Expand Down
2 changes: 1 addition & 1 deletion hcloud/server_types/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .._client import Client


class BoundServerType(BoundModelBase):
class BoundServerType(BoundModelBase, ServerType):
_client: ServerTypesClient

model = ServerType
Expand Down
2 changes: 1 addition & 1 deletion hcloud/servers/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from .domain import ServerCreatePublicNetwork


class BoundServer(BoundModelBase):
class BoundServer(BoundModelBase, Server):
_client: ServersClient

model = Server
Expand Down
2 changes: 1 addition & 1 deletion hcloud/ssh_keys/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .._client import Client


class BoundSSHKey(BoundModelBase):
class BoundSSHKey(BoundModelBase, SSHKey):
_client: SSHKeysClient

model = SSHKey
Expand Down
2 changes: 1 addition & 1 deletion hcloud/volumes/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ..servers import BoundServer, Server


class BoundVolume(BoundModelBase):
class BoundVolume(BoundModelBase, Volume):
_client: VolumesClient

model = Volume
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/core/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, id, name="", description=""):
self.name = name
self.description = description

class BoundModel(BoundModelBase):
class BoundModel(BoundModelBase, Model):
model = Model

return BoundModel
Expand Down

0 comments on commit 0f8abbd

Please sign in to comment.