Skip to content

Commit 38d6553

Browse files
committed
🔧: add tool config
Signed-off-by: nstarman <[email protected]>
1 parent 9027b7d commit 38d6553

File tree

2 files changed

+429
-0
lines changed

2 files changed

+429
-0
lines changed

‎pyproject.toml‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838

3939

4040
[dependency-groups]
41+
dev = [
42+
"pre-commit>=4.0.1",
43+
{ include-group = "test" },
44+
]
4145
test = [
4246
"pytest>=8.3.3",
4347
"pytest-cov >=3",
@@ -49,3 +53,62 @@ test = [
4953
[tool.hatch]
5054
build.hooks.vcs.version-file = "src/array_api_typing/_version.py"
5155
version.source = "vcs"
56+
57+
58+
[tool.coverage]
59+
report.exclude_also = ['\.\.\.', 'if typing.TYPE_CHECKING:']
60+
run.source = ["array-api-typing"]
61+
run.branch = true
62+
63+
64+
[tool.mypy]
65+
files = ["src", "tests"]
66+
python_version = "3.10"
67+
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
68+
69+
strict = true
70+
disallow_incomplete_defs = true
71+
disallow_untyped_defs = true
72+
73+
warn_return_any = true
74+
warn_unreachable = true
75+
warn_unused_configs = true
76+
77+
78+
[tool.pytest.ini_options]
79+
addopts = [
80+
"--showlocals",
81+
"--strict-config",
82+
"--strict-markers",
83+
"-p no:doctest", # using sybil
84+
"-ra",
85+
]
86+
filterwarnings = [
87+
"error",
88+
# Sybil
89+
"ignore:Attribute s is deprecated and will be removed in Python 3\\.14:DeprecationWarning",
90+
"ignore:ast\\.Str is deprecated and will be removed in Python 3\\.14:DeprecationWarning",
91+
]
92+
log_cli_level = "INFO"
93+
minversion = "8.3"
94+
testpaths = ["src/", "tests/", "README.md", "docs"]
95+
norecursedirs = ["docs/_build"]
96+
xfail_strict = true
97+
98+
99+
[tool.ruff]
100+
[tool.ruff.lint]
101+
extend-select = ["ALL"]
102+
ignore = [
103+
"D203", # 1 blank line required before class docstring
104+
"D213", # Multi-line docstring summary should start at the second line
105+
"ISC001", # Conflicts with formatter
106+
]
107+
108+
[tool.ruff.lint.isort]
109+
combine-as-imports = true
110+
extra-standard-library = ["typing_extensions"]
111+
known-local-folder = ["array_api_typing"]
112+
113+
[tool.ruff.format]
114+
docstring-code-format = true

0 commit comments

Comments
 (0)