diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2bb9e91..b51c569 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.8.0 + rev: v3.10.1 hooks: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black @@ -14,6 +14,7 @@ repos: rev: 5.12.0 hooks: - id: isort + args: [--add-import=from __future__ import annotations] - repo: https://github.com/PyCQA/autoflake rev: v2.2.0 @@ -30,10 +31,11 @@ repos: files: \.py$ - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 - additional_dependencies: [flake8-2020, flake8-errmsg, flake8-implicit-str-concat] + additional_dependencies: + [flake8-2020, flake8-errmsg, flake8-implicit-str-concat] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 @@ -61,16 +63,17 @@ repos: files: "src/" - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.4.1 + rev: v1.5.0 hooks: - id: mypy additional_dependencies: [pytest, types-freezegun, types-setuptools] - args: [--strict] + args: [--strict, --pretty, --show-error-codes] - repo: https://github.com/tox-dev/pyproject-fmt - rev: 0.13.0 + rev: 0.13.1 hooks: - id: pyproject-fmt + additional_dependencies: [tox] - repo: https://github.com/abravalheri/validate-pyproject rev: v0.13 diff --git a/pyproject.toml b/pyproject.toml index dbf0621..6c00b06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,6 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/src/humanize/__init__.py b/src/humanize/__init__.py index f06bb6c..19c7c91 100644 --- a/src/humanize/__init__.py +++ b/src/humanize/__init__.py @@ -1,5 +1,7 @@ """Main package for humanize.""" +from __future__ import annotations + import importlib.metadata from humanize.filesize import naturalsize diff --git a/tests/test_i18n.py b/tests/test_i18n.py index 7af3ef2..d4f1e49 100644 --- a/tests/test_i18n.py +++ b/tests/test_i18n.py @@ -1,4 +1,6 @@ """Internationalisation tests.""" +from __future__ import annotations + import datetime as dt import importlib