Skip to content

Commit d07599a

Browse files
committed
Add __all__
1 parent c2e473d commit d07599a

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/labthings_fastapi/__init__.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
from .thing import Thing
22
from .descriptors import ThingProperty, ThingSetting
33
from .decorators import (
4-
thing_property, thing_setting, thing_action,
4+
thing_property,
5+
thing_setting,
6+
thing_action,
57
)
8+
9+
# The symbols in __all__ are part of our public API.
10+
# They are imported when using `import labthings_fastapi as lt`.
11+
# We should check that these symbols stay consistent if modules are rearranged.
12+
# The alternative `from .thing import Thing as Thing` syntax is not used, as
13+
# `mypy` is now happy with the current import style. If other tools prefer the
14+
# re-export style, we may switch in the future.
15+
__all__ = [
16+
"Thing",
17+
"ThingProperty",
18+
"ThingSetting",
19+
"thing_property",
20+
"thing_setting",
21+
"thing_action",
22+
]

0 commit comments

Comments
 (0)