From 0fe92750eca7144c5fed8982d5d3b558741b2994 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Wed, 22 Jan 2025 11:37:21 -0500 Subject: [PATCH] Fix some lint errors --- temporalio/worker/_workflow.py | 6 ++++-- tests/helpers/__init__.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/temporalio/worker/_workflow.py b/temporalio/worker/_workflow.py index c09cfbb59..37575efff 100644 --- a/temporalio/worker/_workflow.py +++ b/temporalio/worker/_workflow.py @@ -180,7 +180,7 @@ async def run(self) -> None: def notify_shutdown(self) -> None: if self._could_not_evict_count: - logger.warn( + logger.warning( f"Shutting down workflow worker, but {self._could_not_evict_count} " + "workflow(s) could not be evicted previously, so the shutdown will hang" ) @@ -244,7 +244,9 @@ async def _handle_activation( self._running_workflows[act.run_id] = workflow elif init_job: # This should never happen - logger.warn("Cache already exists for activation with initialize job") + logger.warning( + "Cache already exists for activation with initialize job" + ) # Run activation in separate thread so we can check if it's # deadlocked diff --git a/tests/helpers/__init__.py b/tests/helpers/__init__.py index 728f1ed83..b1170f3de 100644 --- a/tests/helpers/__init__.py +++ b/tests/helpers/__init__.py @@ -4,7 +4,7 @@ import uuid from contextlib import closing from datetime import timedelta -from typing import Any, Awaitable, Callable, Optional, Sequence, Type, TypeVar +from typing import Awaitable, Callable, Optional, Sequence, Type, TypeVar from temporalio.api.common.v1 import WorkflowExecution from temporalio.api.enums.v1 import IndexedValueType