diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 78cb6e63..4ea69348 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,10 +40,10 @@ repos: # Ruff linter, replacement for flake8, pydocstyle, isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.0.284' + rev: 'v0.0.286' hooks: - id: ruff - args: [--fix, --exit-non-zero-on-fix] + args: [--fix, --show-fixes] # C++ formatting - repo: https://github.com/pre-commit/mirrors-clang-format @@ -62,7 +62,7 @@ repos: # Python type checking - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.5.0' + rev: 'v1.5.1' hooks: - id: mypy additional_dependencies: [numpy] diff --git a/pyproject.toml b/pyproject.toml index 4f8dcdf4..19c684e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,16 +82,27 @@ sdist.include = ["extern/root/math/minuit2/inc", "extern/root/math/minuit2/src"] [tool.pytest.ini_options] minversion = "6.0" -addopts = "-q -ra --ff" +addopts = ["-q", "-ra", "--ff", "--strict-config", "--strict-markers"] +log_cli_level = "INFO" testpaths = ["tests"] +xfail_strict = true filterwarnings = [ "error::numpy.VisibleDeprecationWarning", + "error::PendingDeprecationWarning", "error::DeprecationWarning", + "error::FutureWarning", ] [tool.ruff] -select = ["E", "F", "D"] -extend-ignore = ["D203", "D212", "D200"] +select = [ + "E", "F", # flake8 + "D", # pydocstyle +] +extend-ignore = ["D203", "D212"] +src = ["src"] +unfixable = [ + "F841", # Removes unused variables +] [tool.ruff.pydocstyle] convention = "numpy"