From dc545ea4968052a9d082e017ce93ec689e43b809 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sat, 15 Mar 2025 13:03:53 -0400 Subject: [PATCH] Explicitly reexport modules --- hcloud/actions/__init__.py | 15 +++++++++++++-- hcloud/certificates/__init__.py | 14 ++++++++++++-- hcloud/core/__init__.py | 13 +++++++++++-- hcloud/datacenters/__init__.py | 12 ++++++++++-- hcloud/deprecation/__init__.py | 4 +++- hcloud/firewalls/__init__.py | 16 ++++++++++++++-- hcloud/floating_ips/__init__.py | 12 ++++++++++-- hcloud/helpers/__init__.py | 4 +++- hcloud/images/__init__.py | 12 ++++++++++-- hcloud/isos/__init__.py | 11 +++++++++-- hcloud/load_balancer_types/__init__.py | 11 +++++++++-- hcloud/load_balancers/__init__.py | 26 ++++++++++++++++++++++++-- hcloud/locations/__init__.py | 11 +++++++++-- hcloud/metrics/__init__.py | 7 ++++++- hcloud/networks/__init__.py | 14 ++++++++++++-- hcloud/placement_groups/__init__.py | 12 ++++++++++-- hcloud/primary_ips/__init__.py | 12 ++++++++++-- hcloud/server_types/__init__.py | 11 +++++++++-- hcloud/servers/__init__.py | 22 ++++++++++++++++++++-- hcloud/ssh_keys/__init__.py | 11 +++++++++-- hcloud/volumes/__init__.py | 12 ++++++++++-- pyproject.toml | 1 + 22 files changed, 224 insertions(+), 39 deletions(-) diff --git a/hcloud/actions/__init__.py b/hcloud/actions/__init__.py index ca93c89f..8a96e5de 100644 --- a/hcloud/actions/__init__.py +++ b/hcloud/actions/__init__.py @@ -1,14 +1,25 @@ from __future__ import annotations -from .client import ( # noqa: F401 +from .client import ( ActionsClient, ActionsPageResult, BoundAction, ResourceActionsClient, ) -from .domain import ( # noqa: F401 +from .domain import ( Action, ActionException, ActionFailedException, ActionTimeoutException, ) + +__all__ = [ + "Action", + "ActionException", + "ActionFailedException", + "ActionTimeoutException", + "ActionsClient", + "ActionsPageResult", + "BoundAction", + "ResourceActionsClient", +] diff --git a/hcloud/certificates/__init__.py b/hcloud/certificates/__init__.py index 4e63df57..5b85358e 100644 --- a/hcloud/certificates/__init__.py +++ b/hcloud/certificates/__init__.py @@ -1,13 +1,23 @@ from __future__ import annotations -from .client import ( # noqa: F401 +from .client import ( BoundCertificate, CertificatesClient, CertificatesPageResult, ) -from .domain import ( # noqa: F401 +from .domain import ( Certificate, CreateManagedCertificateResponse, ManagedCertificateError, ManagedCertificateStatus, ) + +__all__ = [ + "BoundCertificate", + "Certificate", + "CertificatesClient", + "CertificatesPageResult", + "CreateManagedCertificateResponse", + "ManagedCertificateError", + "ManagedCertificateStatus", +] diff --git a/hcloud/core/__init__.py b/hcloud/core/__init__.py index 4e17dac9..b553546a 100644 --- a/hcloud/core/__init__.py +++ b/hcloud/core/__init__.py @@ -1,4 +1,13 @@ from __future__ import annotations -from .client import BoundModelBase, ClientEntityBase # noqa: F401 -from .domain import BaseDomain, DomainIdentityMixin, Meta, Pagination # noqa: F401 +from .client import BoundModelBase, ClientEntityBase +from .domain import BaseDomain, DomainIdentityMixin, Meta, Pagination + +__all__ = [ + "BoundModelBase", + "ClientEntityBase", + "BaseDomain", + "DomainIdentityMixin", + "Meta", + "Pagination", +] diff --git a/hcloud/datacenters/__init__.py b/hcloud/datacenters/__init__.py index 559694c0..fdfbb189 100644 --- a/hcloud/datacenters/__init__.py +++ b/hcloud/datacenters/__init__.py @@ -1,8 +1,16 @@ from __future__ import annotations -from .client import ( # noqa: F401 +from .client import ( BoundDatacenter, DatacentersClient, DatacentersPageResult, ) -from .domain import Datacenter, DatacenterServerTypes # noqa: F401 +from .domain import Datacenter, DatacenterServerTypes + +__all__ = [ + "BoundDatacenter", + "Datacenter", + "DatacenterServerTypes", + "DatacentersClient", + "DatacentersPageResult", +] diff --git a/hcloud/deprecation/__init__.py b/hcloud/deprecation/__init__.py index 315576b1..db30b0fb 100644 --- a/hcloud/deprecation/__init__.py +++ b/hcloud/deprecation/__init__.py @@ -1,3 +1,5 @@ from __future__ import annotations -from .domain import DeprecationInfo # noqa: F401 +from .domain import DeprecationInfo + +__all__ = ["DeprecationInfo"] diff --git a/hcloud/firewalls/__init__.py b/hcloud/firewalls/__init__.py index 5205d766..f81ae0df 100644 --- a/hcloud/firewalls/__init__.py +++ b/hcloud/firewalls/__init__.py @@ -1,7 +1,7 @@ from __future__ import annotations -from .client import BoundFirewall, FirewallsClient, FirewallsPageResult # noqa: F401 -from .domain import ( # noqa: F401 +from .client import BoundFirewall, FirewallsClient, FirewallsPageResult +from .domain import ( CreateFirewallResponse, Firewall, FirewallResource, @@ -9,3 +9,15 @@ FirewallResourceLabelSelector, FirewallRule, ) + +__all__ = [ + "BoundFirewall", + "CreateFirewallResponse", + "Firewall", + "FirewallResource", + "FirewallResourceAppliedToResources", + "FirewallResourceLabelSelector", + "FirewallRule", + "FirewallsClient", + "FirewallsPageResult", +] diff --git a/hcloud/floating_ips/__init__.py b/hcloud/floating_ips/__init__.py index 4e55bf5f..8c45c774 100644 --- a/hcloud/floating_ips/__init__.py +++ b/hcloud/floating_ips/__init__.py @@ -1,8 +1,16 @@ from __future__ import annotations -from .client import ( # noqa: F401 +from .client import ( BoundFloatingIP, FloatingIPsClient, FloatingIPsPageResult, ) -from .domain import CreateFloatingIPResponse, FloatingIP # noqa: F401 +from .domain import CreateFloatingIPResponse, FloatingIP + +__all__ = [ + "BoundFloatingIP", + "CreateFloatingIPResponse", + "FloatingIP", + "FloatingIPsClient", + "FloatingIPsPageResult", +] diff --git a/hcloud/helpers/__init__.py b/hcloud/helpers/__init__.py index b6a4cd73..044703bf 100644 --- a/hcloud/helpers/__init__.py +++ b/hcloud/helpers/__init__.py @@ -1,3 +1,5 @@ from __future__ import annotations -from .labels import LabelValidator # noqa: F401 +from .labels import LabelValidator + +__all__ = ["LabelValidator"] diff --git a/hcloud/images/__init__.py b/hcloud/images/__init__.py index 78cb6868..071a92bc 100644 --- a/hcloud/images/__init__.py +++ b/hcloud/images/__init__.py @@ -1,4 +1,12 @@ from __future__ import annotations -from .client import BoundImage, ImagesClient, ImagesPageResult # noqa: F401 -from .domain import CreateImageResponse, Image # noqa: F401 +from .client import BoundImage, ImagesClient, ImagesPageResult +from .domain import CreateImageResponse, Image + +__all__ = [ + "BoundImage", + "CreateImageResponse", + "Image", + "ImagesClient", + "ImagesPageResult", +] diff --git a/hcloud/isos/__init__.py b/hcloud/isos/__init__.py index 0d5e38fa..91f137c3 100644 --- a/hcloud/isos/__init__.py +++ b/hcloud/isos/__init__.py @@ -1,4 +1,11 @@ from __future__ import annotations -from .client import BoundIso, IsosClient, IsosPageResult # noqa: F401 -from .domain import Iso # noqa: F401 +from .client import BoundIso, IsosClient, IsosPageResult +from .domain import Iso + +__all__ = [ + "BoundIso", + "Iso", + "IsosClient", + "IsosPageResult", +] diff --git a/hcloud/load_balancer_types/__init__.py b/hcloud/load_balancer_types/__init__.py index fa1dc33c..1b147bf7 100644 --- a/hcloud/load_balancer_types/__init__.py +++ b/hcloud/load_balancer_types/__init__.py @@ -1,8 +1,15 @@ from __future__ import annotations -from .client import ( # noqa: F401 +from .client import ( BoundLoadBalancerType, LoadBalancerTypesClient, LoadBalancerTypesPageResult, ) -from .domain import LoadBalancerType # noqa: F401 +from .domain import LoadBalancerType + +__all__ = [ + "BoundLoadBalancerType", + "LoadBalancerType", + "LoadBalancerTypesClient", + "LoadBalancerTypesPageResult", +] diff --git a/hcloud/load_balancers/__init__.py b/hcloud/load_balancers/__init__.py index 4bfd7994..33745163 100644 --- a/hcloud/load_balancers/__init__.py +++ b/hcloud/load_balancers/__init__.py @@ -1,11 +1,11 @@ from __future__ import annotations -from .client import ( # noqa: F401 +from .client import ( BoundLoadBalancer, LoadBalancersClient, LoadBalancersPageResult, ) -from .domain import ( # noqa: F401 +from .domain import ( CreateLoadBalancerResponse, GetMetricsResponse, IPv4Address, @@ -23,3 +23,25 @@ PrivateNet, PublicNetwork, ) + +__all__ = [ + "BoundLoadBalancer", + "CreateLoadBalancerResponse", + "GetMetricsResponse", + "IPv4Address", + "IPv6Network", + "LoadBalancer", + "LoadBalancerAlgorithm", + "LoadBalancerHealtCheckHttp", + "LoadBalancerHealthCheck", + "LoadBalancerService", + "LoadBalancerServiceHttp", + "LoadBalancerTarget", + "LoadBalancerTargetHealthStatus", + "LoadBalancerTargetIP", + "LoadBalancerTargetLabelSelector", + "LoadBalancersClient", + "LoadBalancersPageResult", + "PrivateNet", + "PublicNetwork", +] diff --git a/hcloud/locations/__init__.py b/hcloud/locations/__init__.py index 1c23a517..f59c2644 100644 --- a/hcloud/locations/__init__.py +++ b/hcloud/locations/__init__.py @@ -1,4 +1,11 @@ from __future__ import annotations -from .client import BoundLocation, LocationsClient, LocationsPageResult # noqa: F401 -from .domain import Location # noqa: F401 +from .client import BoundLocation, LocationsClient, LocationsPageResult +from .domain import Location + +__all__ = [ + "BoundLocation", + "Location", + "LocationsClient", + "LocationsPageResult", +] diff --git a/hcloud/metrics/__init__.py b/hcloud/metrics/__init__.py index 65d393c8..49555d10 100644 --- a/hcloud/metrics/__init__.py +++ b/hcloud/metrics/__init__.py @@ -1,3 +1,8 @@ from __future__ import annotations -from .domain import Metrics, TimeSeries # noqa: F401 +from .domain import Metrics, TimeSeries + +__all__ = [ + "Metrics", + "TimeSeries", +] diff --git a/hcloud/networks/__init__.py b/hcloud/networks/__init__.py index 5bf4a88f..fc86564b 100644 --- a/hcloud/networks/__init__.py +++ b/hcloud/networks/__init__.py @@ -1,9 +1,19 @@ from __future__ import annotations -from .client import BoundNetwork, NetworksClient, NetworksPageResult # noqa: F401 -from .domain import ( # noqa: F401 +from .client import BoundNetwork, NetworksClient, NetworksPageResult +from .domain import ( CreateNetworkResponse, Network, NetworkRoute, NetworkSubnet, ) + +__all__ = [ + "BoundNetwork", + "CreateNetworkResponse", + "Network", + "NetworkRoute", + "NetworkSubnet", + "NetworksClient", + "NetworksPageResult", +] diff --git a/hcloud/placement_groups/__init__.py b/hcloud/placement_groups/__init__.py index 9c25dd7f..ab82da5a 100644 --- a/hcloud/placement_groups/__init__.py +++ b/hcloud/placement_groups/__init__.py @@ -1,8 +1,16 @@ from __future__ import annotations -from .client import ( # noqa: F401 +from .client import ( BoundPlacementGroup, PlacementGroupsClient, PlacementGroupsPageResult, ) -from .domain import CreatePlacementGroupResponse, PlacementGroup # noqa: F401 +from .domain import CreatePlacementGroupResponse, PlacementGroup + +__all__ = [ + "BoundPlacementGroup", + "CreatePlacementGroupResponse", + "PlacementGroup", + "PlacementGroupsClient", + "PlacementGroupsPageResult", +] diff --git a/hcloud/primary_ips/__init__.py b/hcloud/primary_ips/__init__.py index d079a23b..3dc5ed0a 100644 --- a/hcloud/primary_ips/__init__.py +++ b/hcloud/primary_ips/__init__.py @@ -1,4 +1,12 @@ from __future__ import annotations -from .client import BoundPrimaryIP, PrimaryIPsClient, PrimaryIPsPageResult # noqa: F401 -from .domain import CreatePrimaryIPResponse, PrimaryIP # noqa: F401 +from .client import BoundPrimaryIP, PrimaryIPsClient, PrimaryIPsPageResult +from .domain import CreatePrimaryIPResponse, PrimaryIP + +__all__ = [ + "BoundPrimaryIP", + "CreatePrimaryIPResponse", + "PrimaryIP", + "PrimaryIPsClient", + "PrimaryIPsPageResult", +] diff --git a/hcloud/server_types/__init__.py b/hcloud/server_types/__init__.py index 1e978d09..2cdab177 100644 --- a/hcloud/server_types/__init__.py +++ b/hcloud/server_types/__init__.py @@ -1,8 +1,15 @@ from __future__ import annotations -from .client import ( # noqa: F401 +from .client import ( BoundServerType, ServerTypesClient, ServerTypesPageResult, ) -from .domain import ServerType # noqa: F401 +from .domain import ServerType + +__all__ = [ + "BoundServerType", + "ServerType", + "ServerTypesClient", + "ServerTypesPageResult", +] diff --git a/hcloud/servers/__init__.py b/hcloud/servers/__init__.py index 58c811e5..0b02a110 100644 --- a/hcloud/servers/__init__.py +++ b/hcloud/servers/__init__.py @@ -1,7 +1,7 @@ from __future__ import annotations -from .client import BoundServer, ServersClient, ServersPageResult # noqa: F401 -from .domain import ( # noqa: F401 +from .client import BoundServer, ServersClient, ServersPageResult +from .domain import ( CreateServerResponse, EnableRescueResponse, GetMetricsResponse, @@ -15,3 +15,21 @@ Server, ServerCreatePublicNetwork, ) + +__all__ = [ + "BoundServer", + "CreateServerResponse", + "EnableRescueResponse", + "GetMetricsResponse", + "IPv4Address", + "IPv6Network", + "PrivateNet", + "PublicNetwork", + "PublicNetworkFirewall", + "RequestConsoleResponse", + "ResetPasswordResponse", + "Server", + "ServerCreatePublicNetwork", + "ServersClient", + "ServersPageResult", +] diff --git a/hcloud/ssh_keys/__init__.py b/hcloud/ssh_keys/__init__.py index 25155906..6aefb42e 100644 --- a/hcloud/ssh_keys/__init__.py +++ b/hcloud/ssh_keys/__init__.py @@ -1,4 +1,11 @@ from __future__ import annotations -from .client import BoundSSHKey, SSHKeysClient, SSHKeysPageResult # noqa: F401 -from .domain import SSHKey # noqa: F401 +from .client import BoundSSHKey, SSHKeysClient, SSHKeysPageResult +from .domain import SSHKey + +__all__ = [ + "BoundSSHKey", + "SSHKey", + "SSHKeysClient", + "SSHKeysPageResult", +] diff --git a/hcloud/volumes/__init__.py b/hcloud/volumes/__init__.py index dc8ccbb6..046df102 100644 --- a/hcloud/volumes/__init__.py +++ b/hcloud/volumes/__init__.py @@ -1,4 +1,12 @@ from __future__ import annotations -from .client import BoundVolume, VolumesClient, VolumesPageResult # noqa: F401 -from .domain import CreateVolumeResponse, Volume # noqa: F401 +from .client import BoundVolume, VolumesClient, VolumesPageResult +from .domain import CreateVolumeResponse, Volume + +__all__ = [ + "BoundVolume", + "CreateVolumeResponse", + "Volume", + "VolumesClient", + "VolumesPageResult", +] diff --git a/pyproject.toml b/pyproject.toml index d1bf2ad1..c1fd705e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,7 @@ add_imports = ["from __future__ import annotations"] [tool.mypy] disallow_untyped_defs = true +implicit_reexport = false [tool.coverage.run] source = ["hcloud"]