Skip to content

Commit b25d6c5

Browse files
committed
🔧: add tool config
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
1 parent 9027b7d commit b25d6c5

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

‎pyproject.toml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,60 @@ test = [
4949
[tool.hatch]
5050
build.hooks.vcs.version-file = "src/array_api_typing/_version.py"
5151
version.source = "vcs"
52+
53+
54+
[tool.pytest.ini_options]
55+
addopts = [
56+
"--showlocals",
57+
"--strict-config",
58+
"--strict-markers",
59+
"-p no:doctest", # using sybil
60+
"-ra",
61+
]
62+
filterwarnings = [
63+
"error",
64+
# Sybil
65+
"ignore:Attribute s is deprecated and will be removed in Python 3\\.14:DeprecationWarning",
66+
"ignore:ast\\.Str is deprecated and will be removed in Python 3\\.14:DeprecationWarning",
67+
]
68+
log_cli_level = "INFO"
69+
minversion = "8.3"
70+
testpaths = ["src/", "tests/", "README.md", "docs"]
71+
norecursedirs = ["docs/_build"]
72+
xfail_strict = true
73+
74+
75+
[tool.coverage]
76+
report.exclude_also = ['\.\.\.', 'if typing.TYPE_CHECKING:']
77+
run.source = ["array-api-typing"]
78+
run.branch = true
79+
80+
81+
[tool.mypy]
82+
allow_incomplete_defs = false
83+
allow_untyped_defs = false
84+
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
85+
files = ["src", "tests"]
86+
python_version = "3.10"
87+
strict = true
88+
warn_return_any = true
89+
warn_unreachable = true
90+
warn_unused_configs = true
91+
92+
93+
[tool.ruff]
94+
[tool.ruff.lint]
95+
extend-select = ["ALL"]
96+
ignore = [
97+
"D203", # 1 blank line required before class docstring
98+
"D213", # Multi-line docstring summary should start at the second line
99+
"ISC001", # Conflicts with formatter
100+
]
101+
102+
[tool.ruff.lint.isort]
103+
combine-as-imports = true
104+
extra-standard-library = ["typing_extensions"]
105+
known-local-folder = ["array_api_typing"]
106+
107+
[tool.ruff.format]
108+
docstring-code-format = true

0 commit comments

Comments
 (0)