Skip to content

Commit 65c4025

Browse files
authored
Prefix private modules with underscore (#183)
Fixes #178
1 parent cfdc548 commit 65c4025

20 files changed

+43
-39
lines changed

temporalio/testing/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Test framework for workflows and activities."""
22

3-
from .activity import ActivityEnvironment
4-
from .workflow import WorkflowEnvironment
3+
from ._activity import ActivityEnvironment
4+
from ._workflow import WorkflowEnvironment
55

66
__all__ = [
77
"ActivityEnvironment",
File renamed without changes.
File renamed without changes.

temporalio/worker/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Worker for processing Temporal workflows and/or activities."""
22

3-
from .activity import SharedHeartbeatSender, SharedStateManager
4-
from .interceptor import (
3+
from ._activity import SharedHeartbeatSender, SharedStateManager
4+
from ._interceptor import (
55
ActivityInboundInterceptor,
66
ActivityOutboundInterceptor,
77
ContinueAsNewInput,
@@ -19,9 +19,9 @@
1919
WorkflowInterceptorClassInput,
2020
WorkflowOutboundInterceptor,
2121
)
22-
from .replayer import Replayer, ReplayerConfig
23-
from .worker import Worker, WorkerConfig
24-
from .workflow_instance import (
22+
from ._replayer import Replayer, ReplayerConfig
23+
from ._worker import Worker, WorkerConfig
24+
from ._workflow_instance import (
2525
UnsandboxedWorkflowRunner,
2626
WorkflowInstance,
2727
WorkflowInstanceDetails,

temporalio/worker/activity.py renamed to temporalio/worker/_activity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import temporalio.converter
3434
import temporalio.exceptions
3535

36-
from .interceptor import (
36+
from ._interceptor import (
3737
ActivityInboundInterceptor,
3838
ActivityOutboundInterceptor,
3939
ExecuteActivityInput,
File renamed without changes.

temporalio/worker/replayer.py renamed to temporalio/worker/_replayer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
import temporalio.converter
1919
import temporalio.workflow
2020

21-
from .interceptor import Interceptor
22-
from .worker import load_default_build_id
23-
from .workflow import _WorkflowWorker
24-
from .workflow_instance import UnsandboxedWorkflowRunner, WorkflowRunner
21+
from ._interceptor import Interceptor
22+
from ._worker import load_default_build_id
23+
from ._workflow import _WorkflowWorker
24+
from ._workflow_instance import UnsandboxedWorkflowRunner, WorkflowRunner
2525
from .workflow_sandbox import SandboxedWorkflowRunner
2626

2727
logger = logging.getLogger(__name__)

temporalio/worker/worker.py renamed to temporalio/worker/_worker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
import temporalio.exceptions
2626
import temporalio.service
2727

28-
from .activity import SharedStateManager, _ActivityWorker
29-
from .interceptor import Interceptor
30-
from .workflow import _WorkflowWorker
31-
from .workflow_instance import UnsandboxedWorkflowRunner, WorkflowRunner
28+
from ._activity import SharedStateManager, _ActivityWorker
29+
from ._interceptor import Interceptor
30+
from ._workflow import _WorkflowWorker
31+
from ._workflow_instance import UnsandboxedWorkflowRunner, WorkflowRunner
3232
from .workflow_sandbox import SandboxedWorkflowRunner
3333

3434
logger = logging.getLogger(__name__)

temporalio/worker/workflow.py renamed to temporalio/worker/_workflow.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@
2626
import temporalio.exceptions
2727
import temporalio.workflow
2828

29-
from .interceptor import (
29+
from ._interceptor import (
3030
Interceptor,
3131
WorkflowInboundInterceptor,
3232
WorkflowInterceptorClassInput,
3333
)
34-
from .workflow_instance import WorkflowInstance, WorkflowInstanceDetails, WorkflowRunner
34+
from ._workflow_instance import (
35+
WorkflowInstance,
36+
WorkflowInstanceDetails,
37+
WorkflowRunner,
38+
)
3539

3640
logger = logging.getLogger(__name__)
3741

temporalio/worker/workflow_instance.py renamed to temporalio/worker/_workflow_instance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
import temporalio.exceptions
5050
import temporalio.workflow
5151

52-
from .interceptor import (
52+
from ._interceptor import (
5353
ContinueAsNewInput,
5454
ExecuteWorkflowInput,
5555
HandleQueryInput,

0 commit comments

Comments
 (0)