Skip to content

🔧: add tool config #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@


[dependency-groups]
dev = [
"pre-commit>=4.0.1",
{ include-group = "test" },
]
test = [
"pytest>=8.3.3",
"pytest-cov >=3",
Expand All @@ -49,3 +53,62 @@ test = [
[tool.hatch]
build.hooks.vcs.version-file = "src/array_api_typing/_version.py"
version.source = "vcs"


[tool.coverage]
report.exclude_also = ['\.\.\.', 'if typing.TYPE_CHECKING:']
run.source = ["array-api-typing"]
run.branch = true


[tool.mypy]
files = ["src", "tests"]
python_version = "3.10"
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]

strict = true
disallow_incomplete_defs = true
disallow_untyped_defs = true

warn_return_any = true
warn_unreachable = true
warn_unused_configs = true


[tool.pytest.ini_options]
addopts = [
"--showlocals",
"--strict-config",
"--strict-markers",
"-p no:doctest", # using sybil
"-ra",
]
filterwarnings = [
"error",
# Sybil
"ignore:Attribute s is deprecated and will be removed in Python 3\\.14:DeprecationWarning",
"ignore:ast\\.Str is deprecated and will be removed in Python 3\\.14:DeprecationWarning",
]
log_cli_level = "INFO"
minversion = "8.3"
testpaths = ["src/", "tests/", "README.md", "docs"]
norecursedirs = ["docs/_build"]
xfail_strict = true


[tool.ruff]
[tool.ruff.lint]
extend-select = ["ALL"]
ignore = [
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"ISC001", # Conflicts with formatter
]

[tool.ruff.lint.isort]
combine-as-imports = true
extra-standard-library = ["typing_extensions"]
known-local-folder = ["array_api_typing"]

[tool.ruff.format]
docstring-code-format = true
Loading