Casper van der Wel 1 éve
szülő
commit
bb5568c759

+ 2 - 0
clean_python/base/domain/repository.py

@@ -16,6 +16,8 @@ from .pagination import Page
 from .pagination import PageOptions
 from .root_entity import RootEntity
 
+__all__ = ["Repository"]
+
 T = TypeVar("T", bound=RootEntity)
 
 

+ 2 - 2
clean_python/base/domain/root_entity.py

@@ -9,6 +9,8 @@ from typing import TypeVar
 from .exceptions import BadRequest
 from .value_object import ValueObject
 
+__all__ = ["RootEntity", "now"]
+
 
 def now():
     # this function is there so that we can mock it in tests
@@ -17,8 +19,6 @@ def now():
 
 T = TypeVar("T", bound="RootEntity")
 
-__all__ = ["RootEntity", "now"]
-
 
 class RootEntity(ValueObject):
     id: Optional[int] = None

+ 1 - 1
clean_python/base/domain/value_object.py

@@ -9,7 +9,7 @@ from pydantic import ValidationError
 
 from .exceptions import BadRequest
 
-__all__ = ["ValueObject"]
+__all__ = ["ValueObject", "ValueObjectWithId"]
 
 
 T = TypeVar("T", bound="ValueObject")

+ 3 - 0
clean_python/base/infrastructure/internal_gateway.py

@@ -14,6 +14,9 @@ from clean_python.base.domain import PageOptions
 from clean_python.base.domain import RootEntity
 from clean_python.base.domain import ValueObject
 
+__all__ = ["InternalGateway"]
+
+
 E = TypeVar("E", bound=RootEntity)  # External
 T = TypeVar("T", bound=ValueObject)  # Internal
 

+ 0 - 1
clean_python/dramatiq/__init__.py

@@ -1,3 +1,2 @@
 from .async_actor import *  # NOQA
 from .dramatiq_task_logger import *  # NOQA
-from .sleep_task import *  # NOQA

+ 2 - 0
clean_python/dramatiq/sleep_task.py → clean_python/dramatiq/testing.py

@@ -6,6 +6,8 @@ from dramatiq.middleware import SkipMessage
 
 from .async_actor import async_actor
 
+__all__ = ["sleep_task"]
+
 
 @async_actor(
     retry_when=lambda x, y: isinstance(y, KeyError),

+ 2 - 0
clean_python/fastapi/service.py

@@ -44,6 +44,8 @@ from .resource import Resource
 
 logger = logging.getLogger(__name__)
 
+__all__ = ["Service"]
+
 
 class OAuth2Dependable(OAuth2AuthorizationCodeBearer):
     """A fastapi 'dependable' configuring OAuth2.

+ 2 - 0
clean_python/testing/attr_dict.py

@@ -1,5 +1,7 @@
 # (c) Nelen & Schuurmans
 
+__all__ = ["AttrDict"]
+
 
 class AttrDict(dict):
     def __init__(self, *args, **kwargs):

+ 2 - 0
clean_python/testing/debugger.py

@@ -1,5 +1,7 @@
 import os
 
+__all__ = ["setup_debugger"]
+
 
 def setup_debugger(*, host: str = "0.0.0.0", port: int = 5678):
     """Configure debugging via debugpy."""