-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathty.toml
More file actions
60 lines (54 loc) · 1.79 KB
/
Copy pathty.toml
File metadata and controls
60 lines (54 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# ty Type Checker Configuration
# Migrated from pyproject.toml [tool.ty.*] sections
[environment]
# Target minimum supported Python version (not CI runtime version).
# CI runs 3.13, but we target 3.11 to ensure type compatibility
# across all supported versions per best practice.
python-version = "3.11"
[src]
include = ["src", "tests"]
exclude = [
"scripts/",
"docs/",
"build/",
"dist/",
".venv/",
"**/__pycache__/",
]
respect-ignore-files = true
[rules]
division-by-zero = "error"
possibly-unresolved-reference = "error"
invalid-argument-type = "error"
missing-argument = "error"
unsupported-operator = "error"
unused-ignore-comment = "warn"
redundant-cast = "warn"
unresolved-import = "warn"
[terminal]
output-format = "full"
error-on-warning = false
# =============================================================================
# TEST FILES - RELAXED RULES
# =============================================================================
# ASYMMETRY WITH .pre-commit-config.yaml (intentional):
# - ty.toml: Includes tests/ with relaxed rules (comprehensive analysis)
# - Pre-commit: Excludes tests/ entirely (fast commits, no blocking)
# Rationale: Test code legitimately uses mocks, dynamic fixtures, and intentional
# type violations. We warn (not error) to surface issues without blocking commits.
# See: https://docs.astral.sh/ty/configuration/#per-directory-rule-overrides
[[overrides]]
include = ["tests/**"]
[overrides.rules]
possibly-unresolved-reference = "warn"
unresolved-import = "ignore"
# Additional rules relaxed to warn (from test errors analysis)
invalid-argument-type = "warn"
not-subscriptable = "warn"
unknown-argument = "warn"
unresolved-attribute = "warn"
invalid-assignment = "warn"
unsupported-operator = "warn"
missing-argument = "warn"
not-iterable = "warn"
division-by-zero = "warn"