@@ -49,6 +49,7 @@ psutil = "^5.9.3"
4949pydantic = " ^1.9.1"
5050pydocstyle = " ^6.1.1"
5151pydoctor = " ^23.4.1"
52+ pyright = " >=1.1.377"
5253pytest = " ^7.4"
5354pytest-asyncio = " ^0.21"
5455pytest-timeout = " ^2.2"
@@ -77,6 +78,7 @@ lint = [
7778 {cmd = " ruff check --select I" },
7879 {cmd = " ruff format --check" },
7980 {ref = " lint-types" },
81+ {cmd = " pyright" },
8082 {ref = " lint-docs" },
8183]
8284# TODO(cretz): Why does pydocstyle complain about @overload missing docs after
@@ -174,6 +176,41 @@ privacy = [
174176project-name = " Temporal Python"
175177sidebar-expand-depth = 2
176178
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+
177214[tool .ruff ]
178215target-version = " py38"
179216
0 commit comments