4141
4242[dependency-groups ]
4343 dev = [
44- { include-group = " test" },
45- " lefthook>=1.11.13" ,
44+ { include-group = " lint" },
45+ { include-group = " mypy" },
46+ { include-group = " test_runtime" },
47+ { include-group = " test_static" },
48+ " lefthook==1.11.14" ,
4649 ]
47- test = [
48- " numpy>=1.25" ,
49- " pytest==8.3.3" ,
50- " pytest-cov>=6" ,
51- " pytest-github-actions-annotate-failures>=0.3.0" ,
52- " sybil>=8.0.0" ,
50+ lint = [
51+ " ruff==0.12.1" ,
5352 ]
5453 mypy = [
55- " mypy>=1.16.0"
54+ " mypy==1.16.1" ,
55+ " orjson>=3.10.18; python_version<'3.14'" , # used by mypy
56+ ]
57+ test_runtime = [
58+ " pytest==8.4.1" ,
59+ " pytest-cov>=6.2.1" ,
60+ " pytest-github-actions-annotate-failures==0.3.0" ,
61+ " sybil==9.1.0" ,
62+ ]
63+ test_static = [
64+ { include-group = " mypy" },
65+ " numpy>=1.25" ,
5666 ]
5767
5868
@@ -75,28 +85,14 @@ version_tuple = {version_tuple!r}
7585
7686
7787[tool .mypy ]
78- files = [" src" , " tests" ]
79- python_version = " 3.10"
80- mypy_path = " src"
88+ mypy_path = [" src" ]
89+ namespace_packages = true
8190
8291 strict = true
83- disallow_incomplete_defs = true
84- disallow_untyped_defs = true
85- disable_bytearray_promotion = true # Note(2024-12-05): these are private flags
86- disable_memoryview_promotion = true # Note(2024-12-05): these are private flags
92+ allow_redefinition_new = true
93+ local_partial_types = true
8794 enable_error_code = [" ignore-without-code" , " redundant-expr" , " truthy-bool" ]
88-
89- warn_return_any = true
9095 warn_unreachable = true
91- warn_unused_configs = true
92-
93- [[tool .mypy .overrides ]]
94- module = " sybil.*"
95- ignore_missing_imports = true
96-
97- [[tool .mypy .overrides ]]
98- module = " tests.*"
99- disallow_untyped_defs = false
10096
10197
10298[tool .pytest .ini_options ]
@@ -114,9 +110,8 @@ version_tuple = {version_tuple!r}
114110 " ignore:ast\\ .Str is deprecated and will be removed in Python 3\\ .14:DeprecationWarning" ,
115111 ]
116112 log_cli_level = " INFO"
117- minversion = " 8.3"
118- testpaths = [" README.md" , " src/" , " tests/" ]
119- norecursedirs = [" docs/_build" ]
113+ minversion = " 8.4"
114+ testpaths = [" README.md" , " src/" , " tests/runtime/" ]
120115 xfail_strict = true
121116
122117
@@ -138,6 +133,16 @@ version_tuple = {version_tuple!r}
138133 " ISC001" , # Conflicts with formatter
139134 ]
140135
136+ [tool .ruff .lint .pylint ]
137+ allow-dunder-method-names = [
138+ " __array_api_version__" ,
139+ " __array_namespace__" ,
140+ " __array_namespace_info__" ,
141+ " __dlpack__" ,
142+ " __dlpack_device__" ,
143+ " __dlpack_device__" ,
144+ ]
145+
141146 [tool .ruff .lint .per-file-ignores ]
142147 "tests/*.py" = [" ANN201" , " D1" , " S101" ]
143148
@@ -149,7 +154,7 @@ version_tuple = {version_tuple!r}
149154
150155 [tool .ruff .lint .isort ]
151156 combine-as-imports = true
152- extra-standard-library = [" typing_extensions" ]
157+ extra-standard-library = [" _typeshed " , " typing_extensions" ]
153158 known-local-folder = [" array_api_typing" ]
154159
155160 [tool .ruff .format ]
0 commit comments