Skip to content

Commit 76c02bf

Browse files
committed
uv run ruff check --fix
1 parent 40cadea commit 76c02bf

File tree

8 files changed

+8
-13
lines changed

8 files changed

+8
-13
lines changed

scripts/gen_protos.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import tempfile
77
from functools import partial
88
from pathlib import Path
9-
from typing import List, Mapping, Optional
9+
from typing import List, Mapping
1010

1111
base_dir = Path(__file__).parent.parent
1212
proto_dir = (
@@ -25,8 +25,8 @@
2525
v
2626
for v in proto_dir.glob("**/*.proto")
2727
if not str(v).startswith(str(testsrv_proto_dir / "dependencies"))
28-
and not "health" in str(v)
29-
and not "google" in str(v)
28+
and "health" not in str(v)
29+
and "google" not in str(v)
3030
]
3131
proto_paths.extend(test_proto_dir.glob("**/*.proto"))
3232
proto_paths.extend(additional_proto_dir.glob("**/*.proto"))
@@ -95,7 +95,7 @@ def fix_generated_output(base_path: Path):
9595
message_names = sorted(message_names)
9696
if message_names:
9797
f.write(
98-
f'\n__all__ = [\n "' + '",\n "'.join(message_names) + '",\n]\n'
98+
'\n__all__ = [\n "' + '",\n "'.join(message_names) + '",\n]\n'
9999
)
100100
# gRPC imports
101101
if "service_pb2_grpc" in imports:
@@ -115,7 +115,7 @@ def fix_generated_output(base_path: Path):
115115
message_names.append(message)
116116
# __all__
117117
message_names = sorted(message_names)
118-
f.write(f' __all__.extend(["' + '", "'.join(message_names) + '"])\n')
118+
f.write(' __all__.extend(["' + '", "'.join(message_names) + '"])\n')
119119
f.write("except ImportError:\n pass")
120120

121121

temporalio/activity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def in_activity() -> bool:
244244
Returns:
245245
True if in an activity, False otherwise.
246246
"""
247-
return not _current_context.get(None) is None
247+
return _current_context.get(None) is not None
248248

249249

250250
def info() -> Info:

temporalio/bridge/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import temporalio.bridge.runtime
1515
import temporalio.bridge.temporal_sdk_bridge
16-
from temporalio.bridge.temporal_sdk_bridge import RPCError
1716

1817

1918
@dataclass

temporalio/bridge/worker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
from temporalio.bridge.temporal_sdk_bridge import (
3636
CustomSlotSupplier as BridgeCustomSlotSupplier,
3737
)
38-
from temporalio.bridge.temporal_sdk_bridge import PollShutdownError
3938

4039

4140
@dataclass

temporalio/worker/_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
from ._activity import SharedStateManager, _ActivityWorker
3131
from ._interceptor import Interceptor
32-
from ._tuning import WorkerTuner, _to_bridge_slot_supplier
32+
from ._tuning import WorkerTuner
3333
from ._workflow import _WorkflowWorker
3434
from ._workflow_instance import UnsandboxedWorkflowRunner, WorkflowRunner
3535
from .workflow_sandbox import SandboxedWorkflowRunner

tests/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import asyncio
2-
import logging
3-
import multiprocessing
42
import os
53
import sys
64
from typing import AsyncGenerator

tests/test_converter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import temporalio.api.common.v1
3737
import temporalio.common
3838
from temporalio.api.common.v1 import Payload, Payloads
39-
from temporalio.api.common.v1 import Payload as AnotherNameForPayload
4039
from temporalio.api.failure.v1 import Failure
4140
from temporalio.common import RawValue
4241
from temporalio.converter import (

tests/worker/workflow_sandbox/test_importer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
def test_workflow_sandbox_importer_invalid_module():
2020
with pytest.raises(RestrictedWorkflowAccessError) as err:
2121
with Importer(restrictions, RestrictionContext()).applied():
22-
import tests.worker.workflow_sandbox.testmodules.invalid_module
22+
pass
2323
assert (
2424
err.value.qualified_name
2525
== "tests.worker.workflow_sandbox.testmodules.invalid_module"

0 commit comments

Comments
 (0)