-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathmypy.ini
More file actions
125 lines (94 loc) · 3.14 KB
/
mypy.ini
File metadata and controls
125 lines (94 loc) · 3.14 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
[mypy]
# Basic configuration
python_version = 3.12
# Exclude root scripts and build directories to avoid duplicate module issues
exclude = (?x)(
^(grace\.py|main\.py)$
| ^android/app/build/
| ^mobile/androidApp/build/
| ^packages/
| ^web_ui_qa_reports/
| ^benchmark_results/
)
# Enable strict mode - this enables all strictness flags
strict = True
# Additional strictness beyond strict mode
disallow_any_generics = True
disallow_subclassing_any = True
warn_return_any = True
strict_equality = True
extra_checks = True
# Disallow Dict[str, Any] usage
# Temporarily disabled - too many false positives
# disallow_any_explicit = True
# Show error codes and context
show_error_codes = True
show_column_numbers = True
pretty = True
# Package discovery
explicit_package_bases = True
namespace_packages = True
# Enable pydantic plugin for proper model validation
# and custom plugin to disallow Dict[str, Any]
# plugins = pydantic.mypy, ciris_mypy_toolkit.plugins.no_dict_any_plugin
plugins = pydantic.mypy
# Third party ignores for packages without stubs
[mypy-pydantic.*]
ignore_missing_imports = True
[mypy-pytest.*]
ignore_missing_imports = True
[mypy-asyncio.*]
ignore_missing_imports = True
[mypy-discord.*]
ignore_missing_imports = True
[mypy-uvicorn.*]
ignore_missing_imports = True
[mypy-fastapi.*]
ignore_missing_imports = True
[mypy-instructor.*]
ignore_missing_imports = True
[mypy-docx2txt.*]
ignore_missing_imports = True
[mypy-ntplib.*]
ignore_missing_imports = True
[mypy-psycopg2.*]
ignore_missing_imports = True
[mypy-croniter.*]
ignore_missing_imports = True
# Relax type checking for test files in adapters
[mypy-ciris_adapters.*.tests.*]
disallow_untyped_defs = False
disallow_untyped_decorators = False
# External ciris_verify package stubs
[mypy-ciris_verify.*]
ignore_missing_imports = True
# CIRISVerify FFI bindings (auto-updated from PyPI, don't type-check)
[mypy-ciris_adapters.ciris_verify.ffi_bindings.*]
ignore_errors = True
# Wallet build secrets (generated at build time, not present in CI)
[mypy-ciris_adapters.wallet.providers._build_secrets]
ignore_errors = True
# Files that import build secrets need to ignore "unused type: ignore" warnings
# because the import succeeds locally but fails in CI where the file doesn't exist
[mypy-ciris_adapters.wallet.providers.coinbase_paymaster]
warn_unused_ignores = False
[mypy-ciris_adapters.wallet.providers.x402_provider]
warn_unused_ignores = False
# Optional dependencies (not always installed)
[mypy-cv2.*]
ignore_missing_imports = True
[mypy-numpy.*]
ignore_missing_imports = True
# Mobile Local LLM adapter has platform-specific imports that may not be available
# in all environments (e.g., psutil on mobile, java module on desktop)
[mypy-ciris_adapters.mobile_local_llm.capability]
warn_unused_ignores = False
[mypy-ciris_adapters.mobile_local_llm.inference_server]
warn_unused_ignores = False
[mypy-ciris_adapters.mobile_local_llm.service]
warn_unused_ignores = False
[mypy-ciris_adapters.mobile_local_llm.adapter]
warn_unused_ignores = False
# Wallet chain client has optional crypto libraries
[mypy-ciris_adapters.wallet.providers.chain_client]
warn_unused_ignores = False