@@ -49,6 +49,7 @@ psutil = "^5.9.3"
49
49
pydantic = " ^1.9.1"
50
50
pydocstyle = " ^6.1.1"
51
51
pydoctor = " ^23.4.1"
52
+ pyright = " >=1.1.377"
52
53
pytest = " ^7.4"
53
54
pytest-asyncio = " ^0.21"
54
55
pytest-timeout = " ^2.2"
@@ -77,6 +78,7 @@ lint = [
77
78
{cmd = " ruff check --select I" },
78
79
{cmd = " ruff format --check" },
79
80
{ref = " lint-types" },
81
+ {cmd = " pyright" },
80
82
{ref = " lint-docs" },
81
83
]
82
84
# TODO(cretz): Why does pydocstyle complain about @overload missing docs after
@@ -174,6 +176,41 @@ privacy = [
174
176
project-name = " Temporal Python"
175
177
sidebar-expand-depth = 2
176
178
179
+ [tool .pyright ]
180
+ include = [" temporalio" , " tests" ]
181
+ exclude = [
182
+ " temporalio/api" ,
183
+ " temporalio/bridge/proto" ,
184
+ " tests/worker/workflow_sandbox/testmodules/proto" ,
185
+ " temporalio/bridge/worker.py" ,
186
+ " temporalio/client.py" ,
187
+ " temporalio/contrib/opentelemetry.py" ,
188
+ " temporalio/converter.py" ,
189
+ " temporalio/testing/_workflow.py" ,
190
+ " temporalio/worker/_activity.py" ,
191
+ " temporalio/worker/_replayer.py" ,
192
+ " temporalio/worker/_worker.py" ,
193
+ " temporalio/worker/workflow_sandbox/_importer.py" ,
194
+ " temporalio/worker/workflow_sandbox/_restrictions.py" ,
195
+ " temporalio/workflow.py" ,
196
+ " tests/api/test_grpc_stub.py" ,
197
+ " tests/conftest.py" ,
198
+ " tests/contrib/test_opentelemetry.py" ,
199
+ " tests/test_converter.py" ,
200
+ " tests/test_service.py" ,
201
+ " tests/test_workflow.py" ,
202
+ " tests/worker/test_activity.py" ,
203
+ " tests/worker/test_workflow.py" ,
204
+ " tests/worker/workflow_sandbox/test_importer.py" ,
205
+ " tests/worker/workflow_sandbox/test_restrictions.py" ,
206
+ # TODO: these pass locally but fail in CI with
207
+ # error: Import "temporalio.bridge.temporal_sdk_bridge" could not be resolved
208
+ " temporalio/bridge/client.py" ,
209
+ " temporalio/bridge/metric.py" ,
210
+ " temporalio/bridge/runtime.py" ,
211
+ " temporalio/bridge/testing.py" ,
212
+ ]
213
+
177
214
[tool .ruff ]
178
215
target-version = " py38"
179
216
0 commit comments