@@ -4,4 +4,45 @@ version = "0.1.0"
44description = " Add your description here"
55readme = " README.md"
66requires-python = " ==3.12.10"
7- dependencies = []
7+ dependencies = [
8+ " pyright>=1.1.404" ,
9+ ]
10+
11+ [tool .pyright ]
12+ # --- Environment & discovery ---
13+ pythonVersion = " 3.12.10" # Target Python semantics (pattern matching, typing features, stdlib types).
14+ venvPath = " ." # Where virtual envs live relative to repo root.
15+ venv = " .venv" # The specific env name uv manages (uv sync creates .venv).
16+
17+ # --- What to analyze ---
18+ include = [" src" , " tests" ] # Top-level packages & tests to check.
19+ exclude = [
20+ " **/.venv" , " **/__pycache__" , " build" , " dist" , " .git" ,
21+ " .ruff_cache" , " .mypy_cache"
22+ ]
23+
24+ # --- Global strictness ---
25+ typeCheckingMode = " strict" # Enforce full strict mode repo-wide (see notes below).
26+ useLibraryCodeForTypes = true # If a lib lacks stubs, inspect its code to infer types where possible.
27+
28+ # Make the most common "loose" mistakes fail fast in strict mode.
29+ # You can tune these individually if you need a temporary carve-out.
30+ reportMissingTypeStubs = " error" # Untyped third-party libs must have type info (stubs or inline).
31+ reportUnknownVariableType = " error" # Vars with unknown/implicit Any are not allowed.
32+ reportUnknownMemberType = " error" # Members on unknowns are not allowed.
33+ reportUnknownArgumentType = " error" # Call arguments can't be unknown.
34+ reportUnknownLambdaType = " error" # Lambda params must be typed in strict contexts.
35+ reportImplicitOptional = " error" # T | None must be explicit; no silent Optional.
36+ reportMissingTypeArgument = " error" # Generic types must specify their parameters.
37+ reportIncompatibleVariableOverride = " error" # Subclass fields must type-refine correctly.
38+ reportInvalidTypeVarUse = " error" # Catch misuse of TypeVar/variance.
39+ reportUntypedFunctionDecorator = " error" # Decorators must be typed (prevents Any leakage).
40+ reportUnusedVariable = " error" # Ditto; promote to "error" if you want hard hygiene.
41+ reportUnusedImport = " warning" # Hygiene: warn, but don’t fail builds.
42+
43+
44+ # Tests often deserialize lots of data and patch frameworks; keep them strict,
45+ # but relax "missing stubs" so untyped test-only libs don’t block you.
46+ [[tool .pyright .overrides ]]
47+ module = " tests/**"
48+ reportMissingTypeStubs = " warning"
0 commit comments