-
-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathty.toml
More file actions
56 lines (50 loc) · 2.94 KB
/
ty.toml
File metadata and controls
56 lines (50 loc) · 2.94 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
# -----------------------------------------------------> ty.toml <-----------------------------------------------------
# ty - An extremely fast Python type checker and language server, written in Rust.
# https://docs.astral.sh/ty/reference/configuration
[src]
# Lock what gets checked so "ty check" and "ty check ." act the same
include = ["src", "tests", "examples", "docs"] # keep discovery stable
# Keep Ty aligned with .gitignore and friends (default = true; shown for clarity).
respect-ignore-files = true
[environment]
# Make first-party resolution stable and priority-ordered.
root = ["./src", "."]
# Freeze analysis semantics across dev/CI; set explicitly even if requires-python exists to keep things deterministic.
python-version = "3.14"
# For cross-platform libraries, analyze as if code may run anywhere.
python-platform = "all"
[terminal]
# Fail the run on any warning.
error-on-warning = true
# Verbose output; switch to "concise" when you want minimal output.
output-format = "full"
# Promote every non-error rule to error (strict).
[rules]
# Defaults = warn:
ambiguous-protocol-member = "error" # https://docs.astral.sh/ty/reference/rules/#ambiguous-protocol-member
deprecated = "error" # https://docs.astral.sh/ty/reference/rules/#deprecated
invalid-ignore-comment = "error" # https://docs.astral.sh/ty/reference/rules/#invalid-ignore-comment
possibly-missing-attribute = "error" # https://docs.astral.sh/ty/reference/rules/#possibly-missing-attribute
possibly-missing-implicit-call = "error" # https://docs.astral.sh/ty/reference/rules/#possibly-missing-implicit-call
possibly-missing-import = "error" # https://docs.astral.sh/ty/reference/rules/#possibly-missing-import
redundant-cast = "error" # https://docs.astral.sh/ty/reference/rules/#redundant-cast
undefined-reveal = "error" # https://docs.astral.sh/ty/reference/rules/#undefined-reveal
ignore-comment-unknown-rule = "error" # https://docs.astral.sh/ty/reference/rules/#ignore-comment-unknown-rule
unresolved-global = "error" # https://docs.astral.sh/ty/reference/rules/#unresolved-global
unsupported-base = "error" # https://docs.astral.sh/ty/reference/rules/#unsupported-base
useless-overload-body = "error" # https://docs.astral.sh/ty/reference/rules/#useless-overload-body
# Defaults = ignore:
division-by-zero = "error" # https://docs.astral.sh/ty/reference/rules/#division-by-zero
possibly-unresolved-reference = "error" # https://docs.astral.sh/ty/reference/rules/#possibly-unresolved-reference
unused-ignore-comment = "error" # https://docs.astral.sh/ty/reference/rules/#unused-ignore-comment
# Tests often import optional dev deps or use dynamic patterns.
[[overrides]]
include = ["tests/**", "**/test_*.py", "**/*_test.py", "examples/airblog/**"]
[overrides.rules]
# TODO -> Remove all error code below
unresolved-import = "ignore"
possibly-unresolved-reference = "ignore"
invalid-argument-type = "ignore"
too-many-positional-arguments = "ignore"
unresolved-attribute = "ignore"
possibly-missing-attribute = "ignore"