Skip to content

Commit e0bb4a9

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

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.coverage]
55+
report.exclude_also = ['\.\.\.', 'if typing.TYPE_CHECKING:']
56+
run.source = ["array-api-typing"]
57+
run.branch = true
58+
59+
60+
[tool.mypy]
61+
allow_incomplete_defs = false
62+
allow_untyped_defs = false
63+
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
64+
files = ["src", "tests"]
65+
python_version = "3.10"
66+
strict = true
67+
warn_return_any = true
68+
warn_unreachable = true
69+
warn_unused_configs = true
70+
71+
72+
[tool.pytest.ini_options]
73+
addopts = [
74+
"--showlocals",
75+
"--strict-config",
76+
"--strict-markers",
77+
"-p no:doctest", # using sybil
78+
"-ra",
79+
]
80+
filterwarnings = [
81+
"error",
82+
# Sybil
83+
"ignore:Attribute s is deprecated and will be removed in Python 3\\.14:DeprecationWarning",
84+
"ignore:ast\\.Str is deprecated and will be removed in Python 3\\.14:DeprecationWarning",
85+
]
86+
log_cli_level = "INFO"
87+
minversion = "8.3"
88+
testpaths = ["src/", "tests/", "README.md", "docs"]
89+
norecursedirs = ["docs/_build"]
90+
xfail_strict = 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)