From cf10571f1b32def2d58efce2fb7b9407cd36cd9c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 07:16:12 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.4.0 → v3.8.0](https://github.com/asottile/pyupgrade/compare/v3.4.0...v3.8.0) - [github.com/PyCQA/autoflake: v2.1.1 → v2.2.0](https://github.com/PyCQA/autoflake/compare/v2.1.1...v2.2.0) - [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.4.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.3.0...v1.4.1) - [github.com/tox-dev/pyproject-fmt: 0.10.0 → 0.13.0](https://github.com/tox-dev/pyproject-fmt/compare/0.10.0...0.13.0) - [github.com/tox-dev/tox-ini-fmt: 1.3.0 → 1.3.1](https://github.com/tox-dev/tox-ini-fmt/compare/1.3.0...1.3.1) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 901bb8e..2bb9e91 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.4.0 + rev: v3.8.0 hooks: - id: pyupgrade args: [--py38-plus] @@ -16,7 +16,7 @@ repos: - id: isort - repo: https://github.com/PyCQA/autoflake - rev: v2.1.1 + rev: v2.2.0 hooks: - id: autoflake name: autoflake @@ -61,14 +61,14 @@ repos: files: "src/" - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.3.0 + rev: v1.4.1 hooks: - id: mypy additional_dependencies: [pytest, types-freezegun, types-setuptools] args: [--strict] - repo: https://github.com/tox-dev/pyproject-fmt - rev: 0.10.0 + rev: 0.13.0 hooks: - id: pyproject-fmt @@ -78,7 +78,7 @@ repos: - id: validate-pyproject - repo: https://github.com/tox-dev/tox-ini-fmt - rev: 1.3.0 + rev: 1.3.1 hooks: - id: tox-ini-fmt From e21b1cdff86bf59645446429cc1f6575b2a2d151 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 16 Aug 2023 20:33:40 +0300 Subject: [PATCH 2/2] Update pre-commit --- .pre-commit-config.yaml | 17 ++++++++++------- pyproject.toml | 1 - src/humanize/__init__.py | 2 ++ tests/test_i18n.py | 2 ++ 4 files changed, 14 insertions(+), 8 deletions(-) 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