Skip to content

Commit e433d37

Browse files
authored
chore: define __all__ for all modules and missing exports (#616)
1 parent ae807f2 commit e433d37

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+421
-21
lines changed

hcloud/__init__.py

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

3-
from ._client import ( # noqa pylint: disable=C0414
4-
Client as Client,
5-
constant_backoff_function as constant_backoff_function,
6-
exponential_backoff_function as exponential_backoff_function,
3+
from ._client import (
4+
Client,
5+
constant_backoff_function,
6+
exponential_backoff_function,
77
)
8-
from ._exceptions import ( # noqa pylint: disable=C0414
9-
APIException as APIException,
10-
HCloudException as HCloudException,
11-
)
12-
from ._version import __version__ # noqa
8+
from ._exceptions import APIException, HCloudException
9+
from ._version import __version__
10+
11+
__all__ = [
12+
"__version__",
13+
"Client",
14+
"constant_backoff_function",
15+
"exponential_backoff_function",
16+
"APIException",
17+
"HCloudException",
18+
]

hcloud/actions/__init__.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,25 @@
99
)
1010
from .domain import (
1111
Action,
12+
ActionError,
1213
ActionException,
1314
ActionFailedException,
15+
ActionResource,
1416
ActionStatus,
1517
ActionTimeoutException,
1618
)
1719

1820
__all__ = [
19-
"Action",
20-
"ActionStatus",
21-
"ActionException",
22-
"ActionFailedException",
23-
"ActionTimeoutException",
2421
"ActionsClient",
25-
"ActionSort",
2622
"ActionsPageResult",
2723
"BoundAction",
2824
"ResourceActionsClient",
25+
"ActionSort",
26+
"ActionStatus",
27+
"Action",
28+
"ActionResource",
29+
"ActionError",
30+
"ActionException",
31+
"ActionFailedException",
32+
"ActionTimeoutException",
2933
]

hcloud/actions/client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
from .._client import Client
1212

1313

14+
__all__ = [
15+
"ActionsClient",
16+
"ActionsPageResult",
17+
"BoundAction",
18+
"ResourceActionsClient",
19+
"ActionSort",
20+
]
21+
22+
1423
class BoundAction(BoundModelBase[Action], Action):
1524
_client: ActionsClient
1625

hcloud/actions/domain.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
if TYPE_CHECKING:
99
from .client import BoundAction
1010

11+
__all__ = [
12+
"ActionStatus",
13+
"Action",
14+
"ActionResource",
15+
"ActionError",
16+
"ActionException",
17+
"ActionFailedException",
18+
"ActionTimeoutException",
19+
]
20+
1121
ActionStatus = Literal[
1222
"running",
1323
"success",

hcloud/certificates/client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
from .._client import Client
2323

2424

25+
__all__ = [
26+
"BoundCertificate",
27+
"CertificatesPageResult",
28+
"CertificatesClient",
29+
]
30+
31+
2532
class BoundCertificate(BoundModelBase[Certificate], Certificate):
2633
_client: CertificatesClient
2734

hcloud/certificates/domain.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
from .client import BoundCertificate
1010

1111

12+
__all__ = [
13+
"Certificate",
14+
"ManagedCertificateStatus",
15+
"ManagedCertificateError",
16+
"CreateManagedCertificateResponse",
17+
]
18+
19+
1220
class Certificate(BaseDomain, DomainIdentityMixin):
1321
"""Certificate Domain
1422

hcloud/core/client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
from .._client import Client, ClientBase
1111
from .domain import Meta
1212

13+
__all__ = [
14+
"ResourceClientBase",
15+
"ClientEntityBase",
16+
"BoundModelBase",
17+
]
18+
1319

1420
T = TypeVar("T")
1521

hcloud/core/domain.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55

66
from dateutil.parser import isoparse
77

8+
__all__ = [
9+
"BaseDomain",
10+
"DomainIdentityMixin",
11+
"Pagination",
12+
"Meta",
13+
]
14+
815

916
class BaseDomain:
1017
__api_properties__: tuple[str, ...]

hcloud/datacenters/client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
from ..server_types import BoundServerType
88
from .domain import Datacenter, DatacenterServerTypes
99

10+
__all__ = [
11+
"BoundDatacenter",
12+
"DatacentersPageResult",
13+
"DatacentersClient",
14+
]
15+
1016

1117
class BoundDatacenter(BoundModelBase[Datacenter], Datacenter):
1218
_client: DatacentersClient

hcloud/datacenters/domain.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
from ..locations import Location
99
from ..server_types import BoundServerType
1010

11+
__all__ = [
12+
"Datacenter",
13+
"DatacenterServerTypes",
14+
]
15+
1116

1217
class Datacenter(BaseDomain, DomainIdentityMixin):
1318
"""Datacenter Domain

0 commit comments

Comments
 (0)