|
1 | 1 | [project] |
2 | | - name = "array-api-typing" |
3 | | - dynamic = ["version"] |
4 | | - description = "Static typing support for the array API standard" |
5 | | - readme = "README.md" |
6 | | - requires-python = ">=3.10" |
7 | | - license = "MIT" |
8 | | - authors = [ |
9 | | - { name = "Consortium for Python Data API Standards", email = "data-apis@users.noreply.github.com" }, |
10 | | - { name = "Joren Hammudoglu", email = "jhammudoglu@gmail.com" }, |
11 | | - { name = "Nathaniel Starkman", email = "nstarman@users.noreply.github.com" }, |
12 | | - ] |
13 | | - classifiers = [ |
14 | | - "Development Status :: 1 - Planning", |
15 | | - "Intended Audience :: Developers", |
16 | | - "License :: OSI Approved :: MIT License", |
17 | | - "Operating System :: OS Independent", |
18 | | - "Programming Language :: Python :: 3 :: Only", |
19 | | - "Programming Language :: Python :: 3", |
20 | | - "Programming Language :: Python :: 3.10", |
21 | | - "Programming Language :: Python :: 3.11", |
22 | | - "Programming Language :: Python :: 3.12", |
23 | | - "Programming Language :: Python :: 3.13", |
24 | | - "Programming Language :: Python", |
25 | | - "Topic :: Scientific/Engineering", |
26 | | - "Typing :: Typed", |
27 | | - ] |
28 | | - dependencies = [ |
29 | | - "typing-extensions>=4.14.1", |
30 | | - ] |
31 | | - |
32 | | - [project.urls] |
33 | | - Repository = "https://github.com/data-apis/array-api-typing" |
34 | | - Changelog = "https://github.com/data-apis/array-api-typing/releases" |
35 | | - |
| 2 | +name = "array-api-typing" |
| 3 | +dynamic = ["version"] |
| 4 | +description = "Static typing support for the array API standard" |
| 5 | +readme = "README.md" |
| 6 | +requires-python = ">=3.10" |
| 7 | +license = "MIT" |
| 8 | +authors = [ |
| 9 | + { name = "Consortium for Python Data API Standards", email = "data-apis@users.noreply.github.com" }, |
| 10 | + { name = "Joren Hammudoglu", email = "jhammudoglu@gmail.com" }, |
| 11 | + { name = "Nathaniel Starkman", email = "nstarman@users.noreply.github.com" }, |
| 12 | +] |
| 13 | +classifiers = [ |
| 14 | + "Development Status :: 1 - Planning", |
| 15 | + "Intended Audience :: Developers", |
| 16 | + "License :: OSI Approved :: MIT License", |
| 17 | + "Operating System :: OS Independent", |
| 18 | + "Programming Language :: Python :: 3 :: Only", |
| 19 | + "Programming Language :: Python :: 3", |
| 20 | + "Programming Language :: Python :: 3.10", |
| 21 | + "Programming Language :: Python :: 3.11", |
| 22 | + "Programming Language :: Python :: 3.12", |
| 23 | + "Programming Language :: Python :: 3.13", |
| 24 | + "Programming Language :: Python", |
| 25 | + "Topic :: Scientific/Engineering", |
| 26 | + "Typing :: Typed", |
| 27 | +] |
| 28 | +dependencies = [ |
| 29 | + "typing-extensions>=4.14.1", |
| 30 | +] |
| 31 | + |
| 32 | +[project.urls] |
| 33 | +Repository = "https://github.com/data-apis/array-api-typing" |
| 34 | +Changelog = "https://github.com/data-apis/array-api-typing/releases" |
36 | 35 |
|
37 | 36 | [build-system] |
38 | | - requires = ["hatch-vcs", "hatchling"] |
39 | | - build-backend = "hatchling.build" |
40 | | - |
| 37 | +requires = ["hatch-vcs", "hatchling"] |
| 38 | +build-backend = "hatchling.build" |
41 | 39 |
|
42 | 40 | [dependency-groups] |
43 | | - dev = [ |
44 | | - { include-group = "lint" }, |
45 | | - { include-group = "mypy" }, |
46 | | - { include-group = "test_runtime" }, |
47 | | - { include-group = "test_numpy" }, |
48 | | - "lefthook==1.12.0", |
49 | | - "orjson>=3.11.0; python_version<'3.14'", # used by mypy |
50 | | - ] |
51 | | - lint = [ |
52 | | - "ruff==0.12.4", |
53 | | - ] |
54 | | - mypy = [ |
55 | | - "mypy==1.17.0", |
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_numpy = [ |
64 | | - "numpy>=1.25", |
65 | | - ] |
66 | | - |
| 41 | +dev = [ |
| 42 | + { include-group = "lint" }, |
| 43 | + { include-group = "mypy" }, |
| 44 | + { include-group = "test_runtime" }, |
| 45 | + { include-group = "test_numpy" }, |
| 46 | + "lefthook==1.12.2", |
| 47 | + "orjson>=3.11.0; python_version<'3.14'", # used by mypy |
| 48 | +] |
| 49 | +lint = [ |
| 50 | + "ruff==0.12.4", |
| 51 | + "dprint-py>=0.50.0.0", |
| 52 | +] |
| 53 | +mypy = [ |
| 54 | + "mypy==1.17.0", |
| 55 | +] |
| 56 | +test_runtime = [ |
| 57 | + "pytest==8.4.1", |
| 58 | + "pytest-cov>=6.2.1", |
| 59 | + "pytest-github-actions-annotate-failures==0.3.0", |
| 60 | + "sybil==9.1.0", |
| 61 | +] |
| 62 | +test_numpy = [ |
| 63 | + "numpy>=1.25", |
| 64 | +] |
67 | 65 |
|
68 | 66 | [tool.hatch] |
69 | | - version.source = "vcs" |
| 67 | +version.source = "vcs" |
70 | 68 |
|
71 | | - [tool.hatch.build.hooks.vcs] |
72 | | - version-file = "src/array_api_typing/_version.py" |
73 | | - template = ''' |
| 69 | +[tool.hatch.build.hooks.vcs] |
| 70 | +version-file = "src/array_api_typing/_version.py" |
| 71 | +template = ''' |
74 | 72 | # This file is automatically generated by Hatch |
75 | 73 | version = {version!r} |
76 | 74 | version_tuple = {version_tuple!r} |
77 | 75 | ''' |
78 | 76 |
|
79 | | - |
80 | 77 | [tool.coverage] |
81 | | - report.exclude_also = ['\.\.\.', 'if typing.TYPE_CHECKING:'] |
82 | | - run.source = ["array-api-typing"] |
83 | | - run.branch = true |
84 | | - |
| 78 | +report.exclude_also = ['\.\.\.', 'if typing.TYPE_CHECKING:'] |
| 79 | +run.source = ["array-api-typing"] |
| 80 | +run.branch = true |
85 | 81 |
|
86 | 82 | [tool.mypy] |
87 | | - mypy_path = ["src"] |
88 | | - namespace_packages = true |
89 | | - |
90 | | - strict = true |
91 | | - allow_redefinition_new = true |
92 | | - local_partial_types = true |
93 | | - enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] |
94 | | - warn_unreachable = true |
| 83 | +mypy_path = ["src"] |
| 84 | +namespace_packages = true |
95 | 85 |
|
| 86 | +strict = true |
| 87 | +allow_redefinition_new = true |
| 88 | +local_partial_types = true |
| 89 | +enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] |
| 90 | +warn_unreachable = true |
96 | 91 |
|
97 | 92 | [tool.pytest.ini_options] |
98 | | - addopts = [ |
99 | | - "--showlocals", |
100 | | - "--strict-config", |
101 | | - "--strict-markers", |
102 | | - "-p no:doctest", # using sybil |
103 | | - "-ra", |
104 | | - ] |
105 | | - filterwarnings = [ |
106 | | - "error", |
107 | | - # Sybil |
108 | | - "ignore:Attribute s is deprecated and will be removed in Python 3\\.14:DeprecationWarning", |
109 | | - "ignore:ast\\.Str is deprecated and will be removed in Python 3\\.14:DeprecationWarning", |
110 | | - ] |
111 | | - log_cli_level = "INFO" |
112 | | - minversion = "8.4" |
113 | | - testpaths = ["README.md", "src/", "tests/runtime/"] |
114 | | - xfail_strict = true |
115 | | - |
| 93 | +addopts = [ |
| 94 | + "--showlocals", |
| 95 | + "--strict-config", |
| 96 | + "--strict-markers", |
| 97 | + "-p no:doctest", # using sybil |
| 98 | + "-ra", |
| 99 | +] |
| 100 | +filterwarnings = [ |
| 101 | + "error", |
| 102 | + # Sybil |
| 103 | + "ignore:Attribute s is deprecated and will be removed in Python 3\\.14:DeprecationWarning", |
| 104 | + "ignore:ast\\.Str is deprecated and will be removed in Python 3\\.14:DeprecationWarning", |
| 105 | +] |
| 106 | +log_cli_level = "INFO" |
| 107 | +minversion = "8.4" |
| 108 | +testpaths = ["README.md", "src/", "tests/runtime/"] |
| 109 | +xfail_strict = true |
116 | 110 |
|
117 | 111 | [tool.ruff] |
118 | | - preview = true |
119 | | - force-exclude = true |
120 | | - |
121 | | - [tool.ruff.lint] |
122 | | - extend-select = ["ALL"] |
123 | | - ignore = [ |
124 | | - "COM812", # Conflicts with formatter |
125 | | - "CPY", # Missing copyright notice at top of file (NOTE revisit when autofixable) |
126 | | - "D105", # Missing docstring in magic method |
127 | | - "D107", # Missing docstring in __init__ |
128 | | - "D203", # 1 blank line required before class docstring |
129 | | - "D213", # Multi-line docstring summary should start at the second line |
130 | | - "FBT", # flake8-boolean-trap |
131 | | - "FIX", # flake8-fixme |
132 | | - "ISC001", # Conflicts with formatter |
133 | | - ] |
134 | | - |
135 | | - [tool.ruff.lint.pylint] |
136 | | - allow-dunder-method-names = [ |
137 | | - "__array_api_version__", |
138 | | - "__array_namespace__", |
139 | | - "__array_namespace_info__", |
140 | | - "__dlpack__", |
141 | | - "__dlpack_device__", |
142 | | - "__dlpack_device__", |
143 | | - ] |
144 | | - |
145 | | - [tool.ruff.lint.flake8-import-conventions] |
146 | | - banned-from = ["array_api_typing"] |
147 | | - |
148 | | - [tool.ruff.lint.flake8-import-conventions.extend-aliases] |
149 | | - array_api_typing = "xpt" |
150 | | - |
151 | | - [tool.ruff.lint.isort] |
152 | | - combine-as-imports = true |
153 | | - extra-standard-library = ["_typeshed", "typing_extensions"] |
154 | | - known-local-folder = ["array_api_typing"] |
155 | | - |
156 | | - [tool.ruff.format] |
157 | | - docstring-code-format = true |
158 | | - line-ending = "lf" |
| 112 | +preview = true |
| 113 | +force-exclude = true |
| 114 | + |
| 115 | +[tool.ruff.lint] |
| 116 | +extend-select = ["ALL"] |
| 117 | +ignore = [ |
| 118 | + "COM812", # Conflicts with formatter |
| 119 | + "CPY", # Missing copyright notice at top of file (NOTE revisit when autofixable) |
| 120 | + "D105", # Missing docstring in magic method |
| 121 | + "D107", # Missing docstring in __init__ |
| 122 | + "D203", # 1 blank line required before class docstring |
| 123 | + "D213", # Multi-line docstring summary should start at the second line |
| 124 | + "FBT", # flake8-boolean-trap |
| 125 | + "FIX", # flake8-fixme |
| 126 | + "ISC001", # Conflicts with formatter |
| 127 | +] |
| 128 | + |
| 129 | +[tool.ruff.lint.pylint] |
| 130 | +allow-dunder-method-names = [ |
| 131 | + "__array_api_version__", |
| 132 | + "__array_namespace__", |
| 133 | + "__array_namespace_info__", |
| 134 | + "__dlpack__", |
| 135 | + "__dlpack_device__", |
| 136 | + "__dlpack_device__", |
| 137 | +] |
| 138 | + |
| 139 | +[tool.ruff.lint.flake8-import-conventions] |
| 140 | +banned-from = ["array_api_typing"] |
| 141 | + |
| 142 | +[tool.ruff.lint.flake8-import-conventions.extend-aliases] |
| 143 | +array_api_typing = "xpt" |
| 144 | + |
| 145 | +[tool.ruff.lint.isort] |
| 146 | +combine-as-imports = true |
| 147 | +extra-standard-library = ["_typeshed", "typing_extensions"] |
| 148 | +known-local-folder = ["array_api_typing"] |
| 149 | + |
| 150 | +[tool.ruff.format] |
| 151 | +docstring-code-format = true |
| 152 | +line-ending = "lf" |
0 commit comments