Skip to content

Commit 76c887f

Browse files
committed
mis
1 parent 897a5c4 commit 76c887f

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

src/plumpy/__init__.py

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
PersistenceError,
2727
UnsuccessfulResult,
2828
)
29-
from .futures import CancellableAction, Future, capture_exceptions, create_task
29+
from .futures import CancellableAction, Future, capture_exceptions
3030
from .loaders import DefaultObjectLoader, ObjectLoader, get_object_loader, set_object_loader
31-
from .message import MessageBuilder, ProcessLauncher, create_continue_body, create_launch_body
31+
from .message import MsgContinue, MsgCreate, MsgKill, MsgLaunch, MsgPause, MsgPlay, MsgStatus, ProcessLauncher
3232
from .persistence import (
3333
Bundle,
3434
InMemoryPersister,
@@ -64,26 +64,17 @@
6464
from .workchains import ToContext, WorkChain, WorkChainSpec, if_, return_, while_
6565

6666
__all__ = (
67-
# ports
6867
'UNSPECIFIED',
69-
# utils
7068
'AttributesDict',
71-
# persistence
7269
'Bundle',
73-
# processes
7470
'BundleKeys',
75-
# futures
7671
'CancellableAction',
77-
# exceptions
7872
'ClosedError',
79-
# process_states/States
8073
'Continue',
81-
# coordinator
8274
'Coordinator',
8375
'CoordinatorConnectionError',
8476
'CoordinatorTimeoutError',
8577
'Created',
86-
# loaders
8778
'DefaultObjectLoader',
8879
'Excepted',
8980
'Finished',
@@ -92,39 +83,39 @@
9283
'InputPort',
9384
'Interruption',
9485
'InvalidStateError',
95-
# process_states/Commands
9686
'Kill',
9787
'KillInterruption',
9888
'Killed',
9989
'KilledError',
10090
'LoadSaveContext',
101-
# message
102-
'MessageBuilder',
91+
'MsgContinue',
92+
'MsgCreate',
93+
'MsgKill',
94+
'MsgLaunch',
95+
'MsgPause',
96+
'MsgPlay',
97+
'MsgStatus',
10398
'ObjectLoader',
10499
'OutputPort',
105100
'PauseInterruption',
106101
'PersistedCheckpoint',
107102
'PersistenceError',
108103
'Persister',
109104
'PicklePersister',
110-
# event
111105
'PlumpyEventLoopPolicy',
112106
'Port',
113107
'PortNamespace',
114108
'PortValidationError',
115109
'Process',
116-
# controller
117110
'ProcessController',
118111
'ProcessLauncher',
119-
# process_listener
120112
'ProcessListener',
121113
'ProcessSpec',
122114
'ProcessState',
123115
'Running',
124116
'Savable',
125117
'SavableFuture',
126118
'Stop',
127-
# workchain
128119
'ToContext',
129120
'TransitionFailed',
130121
'UnsuccessfulResult',
@@ -136,7 +127,6 @@
136127
'capture_exceptions',
137128
'create_continue_body',
138129
'create_launch_body',
139-
'create_task',
140130
'get_event_loop',
141131
'get_object_loader',
142132
'if_',

src/plumpy/process_states.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
from typing_extensions import override
2424
from yaml.loader import Loader
2525

26-
from plumpy.persistence import ensure_object_loader
2726
from plumpy.message import Message, MsgKill, MsgPause
27+
from plumpy.persistence import ensure_object_loader
2828

2929
try:
3030
import tblib
@@ -638,7 +638,6 @@ class Killed:
638638
is_terminal: ClassVar[bool] = True
639639

640640
def __init__(self, msg: Optional[Message]):
641-
642641
"""
643642
:param msg: Optional kill message
644643
"""

src/plumpy/processes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,13 +1149,12 @@ def pause(self, msg_text: str | None = None) -> Union[bool, CancellableAction]:
11491149

11501150
msg = MsgPause.new(msg_text)
11511151
return self._do_pause(state_msg=msg)
1152-
1152+
11531153
@staticmethod
11541154
def _interrupt(state: Interruptable, reason: Exception) -> None:
11551155
state.interrupt(reason)
11561156

11571157
def _do_pause(self, state_msg: Optional[Message], next_state: Optional[state_machine.State] = None) -> bool:
1158-
11591158
"""Carry out the pause procedure, optionally transitioning to the next state first"""
11601159
try:
11611160
if next_state is not None:

0 commit comments

Comments
 (0)