Skip to content

Commit 4fdb431

Browse files
tconley1428claude
andcommitted
Remove pyright exclusion for tests/test_service.py and fix type errors
Fixed 3 type errors: - Added type ignore comments for CallCollectingChannel abstract class usage - Added type ignore comment for unary_unary method override incompatibility - Added type ignore comment for __abstractmethods__ attribute assignment 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent cf14c92 commit 4fdb431

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ exclude = [
202202
"temporalio/api",
203203
"temporalio/bridge/proto",
204204
"tests/worker/workflow_sandbox/testmodules/proto",
205-
"tests/test_service.py",
206205
"tests/worker/test_activity.py",
207206
"tests/worker/workflow_sandbox/test_importer.py",
208207
"tests/worker/workflow_sandbox/test_restrictions.py",

tests/test_service.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def assert_all_calls_present(
5252
service_calls.add(name)
5353

5454
# Collect gRPC service calls with a fake channel
55-
channel = CallCollectingChannel(package, custom_req_resp)
55+
channel = CallCollectingChannel(package, custom_req_resp) # type: ignore
5656
new_stub(channel)
5757

5858
# Confirm they are the same
@@ -115,7 +115,7 @@ def __init__(
115115
self.custom_req_resp = custom_req_resp
116116
self.calls: Dict[str, Tuple[Type, Type]] = {}
117117

118-
def unary_unary(self, method, request_serializer, response_deserializer):
118+
def unary_unary(self, method, request_serializer, response_deserializer): # type: ignore[reportIncompatibleMethodOverride]
119119
# Last part after slash
120120
name = method.rsplit("/", 1)[-1]
121121
req_resp = self.custom_req_resp.get(name, None) or (
@@ -127,7 +127,9 @@ def unary_unary(self, method, request_serializer, response_deserializer):
127127
self.calls[name] = req_resp
128128

129129

130-
CallCollectingChannel.__abstractmethods__ = set()
130+
CallCollectingChannel.__abstractmethods__ = set() # type: ignore[reportAttributeAccessIssue]
131+
132+
131133

132134

133135
def test_version():

0 commit comments

Comments
 (0)