From 22a39fbd935add999a63a285853c21f45c50519e Mon Sep 17 00:00:00 2001 From: paer Date: Fri, 1 Sep 2023 18:19:08 +0800 Subject: [PATCH] lint codes Signed-off-by: paer --- fed/_private/global_context.py | 2 +- fed/api.py | 2 +- tests/test_exit_on_failure_sending.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fed/_private/global_context.py b/fed/_private/global_context.py index d62f2e0..e579ccb 100644 --- a/fed/_private/global_context.py +++ b/fed/_private/global_context.py @@ -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() diff --git a/fed/api.py b/fed/api.py index 781ef4f..69736e8 100644 --- a/fed/api.py +++ b/fed/api.py @@ -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.') diff --git a/tests/test_exit_on_failure_sending.py b/tests/test_exit_on_failure_sending.py index 9b59553..ab1a861 100644 --- a/tests/test_exit_on_failure_sending.py +++ b/tests/test_exit_on_failure_sending.py @@ -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()