Skip to content

Commit

Permalink
lint codes
Browse files Browse the repository at this point in the history
Signed-off-by: paer <chenqixiang.cqx@antgroup.com>
  • Loading branch information
paer committed Sep 1, 2023
1 parent 26c6e2f commit 22a39fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fed/_private/global_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class GlobalContext:
def __init__(self, job_name: str,
failure_handler: Callable[[], None] ) -> None:
failure_handler: Callable[[], None]) -> None:
self._job_name = job_name
self._seq_count = 0
self._cleanup_manager = CleanupManager()
Expand Down
2 changes: 1 addition & 1 deletion fed/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def shutdown(intended=True):
failure_handler = get_global_context().failure_handler()
compatible_utils._clear_internal_kv()
clear_global_context()
if(not intended and failure_handler is not None):
if (not intended and failure_handler is not None):
failure_handler()
logger.info('Shutdowned rayfed.')

Expand Down
2 changes: 1 addition & 1 deletion tests/test_exit_on_failure_sending.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def run(party):
'timeout_ms': 20 * 1000,
},
},
failure_handler= lambda : os.kill(os.getpid(), signal.SIGTERM)
failure_handler=lambda : os.kill(os.getpid(), signal.SIGTERM)
)

o = f.party("alice").remote()
Expand Down

0 comments on commit 22a39fb

Please sign in to comment.