Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
rev: v0.15.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff
args: [--preview, --select=CPY]
- id: ruff-format
- repo: https://github.com/biomejs/pre-commit
rev: v2.3.10
rev: v2.3.14
hooks:
- id: biome-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.12.1
rev: v2.15.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/pre-commit/mirrors-mypy
Expand Down
46 changes: 21 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ name = "legacy-api-wrap"
readme = "README.rst"
license = "MPL-2.0"
authors = [ { name = "Philipp A.", email = "flying-sheep@web.de" } ]
requires-python = ">=3.9"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -22,7 +21,7 @@ classifiers = [
"Typing :: Typed",
]
dynamic = [ "description", "version" ]
dependencies = [ ]
dependencies = []
optional-dependencies.test = [
"anyconfig[toml]>=0.14", # coverage-rich uses anyconfig
"coverage",
Expand All @@ -32,23 +31,18 @@ optional-dependencies.test = [
]
urls.Source = "https://github.com/flying-sheep/legacy-api-wrap"

[tool.hatch.build.targets.wheel]
packages = [ "src/legacy_api_wrap", "src/testing/legacy_api_wrap" ]
[tool.hatch.envs.hatch-test]
default-args = [ ]
features = [ "test" ]
extra-dependencies = [ "ipython" ]
scripts.run = "pytest{env:HATCH_TEST_ARGS:} {args}"
scripts.run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
scripts.cov-combine = "coverage combine"
scripts.cov-report = "coverage-rich report"
[[tool.hatch.envs.hatch-test.matrix]]
python = [ "3.9", "3.14" ]

[tool.hatch.metadata.hooks.docstring-description]

[tool.hatch.version]
source = "vcs"
[tool.hatch]
build.targets.wheel.packages = [ "src/legacy_api_wrap", "src/testing/legacy_api_wrap" ]
envs.hatch-test.default-args = []
envs.hatch-test.features = [ "test" ]
envs.hatch-test.extra-dependencies = [ "ipython" ]
envs.hatch-test.scripts.run = "pytest{env:HATCH_TEST_ARGS:} {args}"
envs.hatch-test.scripts.run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
envs.hatch-test.scripts.cov-combine = "coverage combine"
envs.hatch-test.scripts.cov-report = "coverage-rich report"
envs.hatch-test.matrix = [ { python = [ "3.14", "3.10" ] } ]
metadata.hooks.docstring-description = {}
version.source = "vcs"

[tool.ruff]
line-length = 100
Expand All @@ -72,22 +66,24 @@ lint.flake8-copyright.notice-rgx = "SPDX-License-Identifier: MPL-2\\.0"
lint.isort.known-first-party = [ "legacy_api_wrap" ]
lint.isort.required-imports = [ "from __future__ import annotations" ]

[tool.pytest.ini_options]
[tool.pytest]
strict = true
addopts = [
"--import-mode=importlib",
"--strict-markers",
"-Werror",
"-ptesting.legacy_api_wrap.pytest",
"--doctest-modules",
"--doctest-glob=*.rst",
]
filterwarnings = [
"error",
]

[tool.coverage]
run.data_file = "test-data/coverage"
xml.output = "test-data/coverage.xml"
html.directory = "test-data/htmlcov"
run.omit = [ "src/testing/*", "tests/*" ]
report.exclude_also = [ "if TYPE_CHECKING:" ]
html.directory = "test-data/htmlcov"
xml.output = "test-data/coverage.xml"

[tool.mypy]
strict = true
Expand Down
2 changes: 1 addition & 1 deletion src/legacy_api_wrap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def fn_compatible(*args_all: P.args, **kw: P.kwargs) -> R:
else {}
),
)
kw_new = {**kw, **dict(zip(old_positionals, args_rest))}
kw_new = {**kw, **dict(zip(old_positionals, args_rest, strict=False))}

return fn(*args_pos, **kw_new) # type: ignore[arg-type]

Expand Down