diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d6ff68..a845975 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.15.9 hooks: - id: ruff-check args: [--exit-non-zero-on-fix] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.3.1 hooks: - id: black @@ -27,28 +27,28 @@ repos: exclude: \.github/ISSUE_TEMPLATE\.md|\.github/PULL_REQUEST_TEMPLATE\.md - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.36.0 + rev: 0.37.1 hooks: - id: check-github-workflows - id: check-renovate - repo: https://github.com/rhysd/actionlint - rev: v1.7.10 + rev: v1.7.12 hooks: - id: actionlint - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.19.0 + rev: v1.23.1 hooks: - id: zizmor - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.11.1 + rev: v2.21.0 hooks: - id: pyproject-fmt - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.24.1 + rev: v0.25 hooks: - id: validate-pyproject @@ -63,7 +63,7 @@ repos: - id: yamlfmt - repo: https://github.com/rbubley/mirrors-prettier - rev: v3.7.4 + rev: v3.8.1 hooks: - id: prettier args: [--prose-wrap=always, --print-width=88] diff --git a/pyproject.toml b/pyproject.toml index 8edfe1e..96545a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,28 +40,21 @@ optional-dependencies.tests = [ "pytest", "pytest-cov", ] +urls."Issue tracker" = "https://github.com/python-humanize/humanize/issues" +urls."Release notes" = "https://github.com/python-humanize/humanize/releases" urls.Documentation = "https://humanize.readthedocs.io/" urls.Funding = "https://tidelift.com/subscription/pkg/pypi-humanize?utm_source=pypi-humanize&utm_medium=pypi" urls.Homepage = "https://github.com/python-humanize/humanize" -urls."Issue tracker" = "https://github.com/python-humanize/humanize/issues" -urls."Release notes" = "https://github.com/python-humanize/humanize/releases" urls.Source = "https://github.com/python-humanize/humanize" [tool.hatch] version.source = "vcs" - -[tool.hatch.build] -artifacts = [ "*.mo" ] - -[tool.hatch.build.hooks.vcs] -version-file = "src/humanize/_version.py" - -[tool.hatch.version.raw-options] -local_scheme = "no-local-version" +version.raw-options.local_scheme = "no-local-version" +build.artifacts = [ "*.mo" ] +build.hooks.vcs.version-file = "src/humanize/_version.py" [tool.ruff] fix = true - lint.select = [ "C4", # flake8-comprehensions "D", # pydocstyle @@ -103,21 +96,21 @@ lint.future-annotations = true [tool.pyproject-fmt] max_supported_python = "3.15" -[tool.pytest.ini_options] -addopts = "--color=yes" -filterwarnings = [ +[tool.mypy] +pretty = true +strict = true +show_error_codes = true + +[tool.pytest] +ini_options.addopts = "--color=yes" +ini_options.filterwarnings = [ "error", ] -testpaths = [ "tests" ] +ini_options.testpaths = [ "tests" ] -[tool.coverage.report] +[tool.coverage] # Regexes for lines to exclude from consideration -exclude_also = [ +report.exclude_also = [ # Don't complain if non-runnable code isn't run: "if __name__ == .__main__.:", ] - -[tool.mypy] -pretty = true -strict = true -show_error_codes = true diff --git a/tests/test_filesize.py b/tests/test_filesize.py index c3e7386..04774d9 100644 --- a/tests/test_filesize.py +++ b/tests/test_filesize.py @@ -1,6 +1,7 @@ #!/usr/bin/env python """Tests for filesize humanizing.""" + from __future__ import annotations import pytest