-
-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathmypy.ini
More file actions
121 lines (89 loc) · 3.03 KB
/
Copy pathmypy.ini
File metadata and controls
121 lines (89 loc) · 3.03 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
[mypy]
# Mypy configuration for LEDMatrix
# What a bare `mypy` checks. ini values can't span lines or carry trailing
# comments -- this file used to have both, so mypy refused to read it at all.
files = src
exclude = (^|/)(test|__pycache__)/
# Python version: the oldest the installer supports (Raspberry Pi OS
# Bookworm ships 3.11; Trixie ships 3.13).
python_version = 3.11
# Platform (Linux/Raspberry Pi)
platform = linux
# Follow imports
follow_imports = normal
# Ignore missing imports (for optional dependencies)
ignore_missing_imports = True
# Show error codes
show_error_codes = True
# Warn about unused ignores
warn_unused_ignores = True
# Warn about unreachable code
warn_unreachable = True
# Strict optional checking
strict_optional = True
# Disallow untyped definitions (set to True once all code is typed)
disallow_untyped_defs = False
# Disallow untyped calls (set to True once all code is typed)
disallow_untyped_calls = False
# Check untyped definitions
check_untyped_defs = True
# No implicit optional
no_implicit_optional = True
# Warn about return Any
warn_return_any = True
# Warn about unused configs
warn_unused_configs = True
# Per-module options
[mypy-src.*]
# Allow untyped for now, but check typed code
disallow_untyped_defs = False
disallow_untyped_calls = False
[mypy-src.cache_manager]
# Cache manager has comprehensive type hints
disallow_untyped_defs = True
disallow_untyped_calls = True
[mypy-src.config_manager]
# Config manager has comprehensive type hints
disallow_untyped_defs = True
disallow_untyped_calls = True
[mypy-src.plugin_system.*]
# Plugin system has type hints
disallow_untyped_defs = False
disallow_untyped_calls = False
[mypy-src.exceptions]
# Exceptions module
disallow_untyped_defs = True
# Ignore third-party libraries that may not have type stubs
[mypy-rgbmatrix.*]
ignore_missing_imports = True
[mypy-RGBMatrixEmulator.*]
ignore_missing_imports = True
[mypy-PIL.*]
ignore_missing_imports = True
[mypy-freetype.*]
ignore_missing_imports = True
[mypy-pytz.*]
ignore_missing_imports = True
[mypy-requests.*]
ignore_missing_imports = True
[mypy-Flask.*]
ignore_missing_imports = True
[mypy-google.*]
ignore_missing_imports = True
[mypy-spotipy.*]
ignore_missing_imports = True
# numpy's own stubs (numpy>=2.3) use Python 3.12 `type` statements, which mypy
# refuses to parse under python_version = 3.11 -- and 3.11 (Bookworm) is the
# floor this code has to run on, so it stays. Treat numpy as Any instead: skip it, and
# follow_imports_for_stubs makes the skip apply to its .pyi files too.
[mypy-numpy.*]
follow_imports = skip
follow_imports_for_stubs = True
# orjson is optional (see requirements.txt): the modules that use it fall back
# to the stdlib when `import orjson` fails. Whether mypy sees its stubs would
# otherwise depend on whether it happens to be installed -- installed, the
# `orjson = None` fallback is a type error and the stdlib branch "unreachable";
# not installed, silencing either is an unused ignore. Treat it as Any always.
[mypy-orjson.*]
follow_imports = skip
follow_imports_for_stubs = True