File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,11 @@ Both type checkers are configured in `python/pyproject.toml`.
5757 and infer return types
5858* ` python_version = "3.10" ` : Matches ruff.target-version
5959
60- ** ty** (` [tool.ty.src ] ` ):
60+ ** ty** (` [[ tool.ty.overrides] ] ` ):
6161
62- * ` exclude ` : Excludes the ` samples ` directory (external dependencies not in workspace)
62+ * Uses overrides to ignore ` unresolved-import ` errors in ` samples/ ` directory
63+ (external dependencies not installed in the workspace)
64+ * ty still type-checks all code in samples, just tolerates missing third-party imports
6365
6466### Error Suppression Policy
6567
Original file line number Diff line number Diff line change @@ -190,6 +190,11 @@ untyped_def_behavior = "check-and-infer-return-type"
190190# example-error-code = false
191191
192192# ty (Astral/Ruff) type checker configuration.
193- [tool .ty .src ]
194- # Exclude samples directory as they have external dependencies not in the workspace.
195- exclude = [" samples" ]
193+ # Use overrides to ignore unresolved-import errors in samples directory,
194+ # which has external dependencies not installed in the workspace.
195+ # This lets ty check all code while tolerating missing third-party stubs.
196+ [[tool .ty .overrides ]]
197+ include = [" samples/**" ]
198+
199+ [tool .ty .overrides .rules ]
200+ unresolved-import = " ignore"
You can’t perform that action at this time.
0 commit comments