Skip to content
Open
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
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- repo: https://github.com/woodruffw/zizmor-pre-commit
- repo: https://github.com/zizmorcore/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

Expand All @@ -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]
Expand Down
39 changes: 16 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions tests/test_filesize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python

"""Tests for filesize humanizing."""

from __future__ import annotations

import pytest
Expand Down
Loading