From 4a23b642cb3ca7fa7474055cacc02af8a1123122 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 20:04:08 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/asottile/reorder-python-imports: v3.12.0 → v3.15.0](https://github.com/asottile/reorder-python-imports/compare/v3.12.0...v3.15.0) - [github.com/psf/black: 23.12.1 → 25.1.0](https://github.com/psf/black/compare/23.12.1...25.1.0) - [github.com/asottile/pyupgrade: v3.15.0 → v3.20.0](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.20.0) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.15.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.15.0) - [github.com/asottile/setup-cfg-fmt: v2.5.0 → v2.8.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.5.0...v2.8.0) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e756709..bbde9df 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,28 +1,28 @@ exclude: ^tests/fixtures/ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-yaml - id: debug-statements - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/asottile/reorder-python-imports - rev: v3.12.0 + rev: v3.15.0 hooks: - id: reorder-python-imports args: [--application-directories, '.:src', --py38-plus] - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 25.1.0 hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.20.0 hooks: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.15.0 hooks: - id: mypy exclude: ^(docs/|tests/) @@ -31,7 +31,7 @@ repos: hooks: - id: gitlint - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.5.0 + rev: v2.8.0 hooks: - id: setup-cfg-fmt args: [--min-py3-version, '3.8'] From da6722045423a5fca2cc5d5ded7356e54099e0d2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 20:04:22 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- setup.cfg | 3 --- uritemplate/api.py | 1 + uritemplate/template.py | 2 +- uritemplate/variable.py | 8 ++++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/setup.cfg b/setup.cfg index ebce209..75b3339 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,9 +12,6 @@ license_files = LICENSE classifiers = Development Status :: 5 - Production/Stable Intended Audience :: Developers - License :: OSI Approved - License :: OSI Approved :: Apache Software License - License :: OSI Approved :: BSD License Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only diff --git a/uritemplate/api.py b/uritemplate/api.py index ac75473..8da3914 100644 --- a/uritemplate/api.py +++ b/uritemplate/api.py @@ -6,6 +6,7 @@ This module contains the very simple API provided by uritemplate. """ + import typing as t from uritemplate import variable diff --git a/uritemplate/template.py b/uritemplate/template.py index 73ef89c..3205380 100644 --- a/uritemplate/template.py +++ b/uritemplate/template.py @@ -14,6 +14,7 @@ > """ + import re import typing as t @@ -35,7 +36,6 @@ def _merge( class URITemplate: - """This parses the template and will be used to expand it. This is the most important object as the center of the API. diff --git a/uritemplate/variable.py b/uritemplate/variable.py index da406ca..0436f21 100644 --- a/uritemplate/variable.py +++ b/uritemplate/variable.py @@ -14,6 +14,7 @@ > """ + import collections.abc import typing as t import urllib.parse @@ -29,7 +30,6 @@ class URIVariable: - """This object validates everything inside the URITemplate object. It validates template expansions and will truncate length as decided by @@ -59,9 +59,9 @@ def __init__(self, var: str): #: List of safe characters when quoting the string self.safe: str = "" #: List of variables in this variable - self.variables: t.List[ - t.Tuple[str, t.MutableMapping[str, t.Any]] - ] = [] + self.variables: t.List[t.Tuple[str, t.MutableMapping[str, t.Any]]] = ( + [] + ) #: List of variable names self.variable_names: t.List[str] = [] #: List of defaults passed in From 0f2c0f3b4896b0fec75d4063c31f99dc70dab421 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 29 May 2025 02:11:01 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b08f8e7..4525744 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,4 +33,4 @@ repos: rev: v2.8.0 hooks: - id: setup-cfg-fmt - args: [--min-py-version, '3.9'] \ No newline at end of file + args: [--min-py-version, '3.9']