diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cdc3bb664..a945ade00 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,24 +24,24 @@ repos: - id: python-no-log-warn - id: text-unicode-replacement-char - repo: https://github.com/asottile/reorder-python-imports - rev: v3.9.0 + rev: v3.10.0 hooks: - id: reorder-python-imports args: [--py38-plus, --add-import, 'from __future__ import annotations'] - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.3.0 + rev: v2.4.0 hooks: - id: setup-cfg-fmt - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.270 + rev: v0.0.286 hooks: - id: ruff - repo: https://github.com/dosisod/refurb - rev: v1.16.0 + rev: v1.20.0 hooks: - id: refurb args: [--ignore, FURB126] @@ -52,7 +52,7 @@ repos: args: [-vv, --fail-under=75] exclude: ^(tests/|docs/|scripts/) - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.3.0' + rev: 'v1.5.1' hooks: - id: mypy args: [ @@ -66,7 +66,7 @@ repos: ] pass_filenames: false - repo: https://github.com/executablebooks/mdformat - rev: 0.7.16 + rev: 0.7.17 hooks: - id: mdformat additional_dependencies: [ @@ -76,7 +76,7 @@ repos: args: [--wrap, "88"] files: (README\.md) - repo: https://github.com/executablebooks/mdformat - rev: 0.7.16 + rev: 0.7.17 hooks: - id: mdformat additional_dependencies: [ @@ -101,7 +101,7 @@ repos: docs/source/tutorials/set_up_a_project.md )$ - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.5 hooks: - id: codespell additional_dependencies: [tomli] diff --git a/pyproject.toml b/pyproject.toml index d494d5b14..b1f287ac2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,3 +93,7 @@ markers = [ ] norecursedirs = [".idea", ".tox"] filterwarnings = ["ignore:'@pytask.mark.*. is deprecated:DeprecationWarning"] + + +[tool.refurb] +python_version = "3.8" diff --git a/src/_pytask/click.py b/src/_pytask/click.py index d972cd257..6268f7907 100644 --- a/src/_pytask/click.py +++ b/src/_pytask/click.py @@ -5,6 +5,7 @@ import inspect from gettext import gettext as _ from typing import Any +from typing import ClassVar import click from _pytask import __version__ as version @@ -55,7 +56,7 @@ def convert( class _OptionHighlighter(RegexHighlighter): """A highlighter for help texts.""" - highlights = [ + highlights: ClassVar = [ r"(?P\-\w)\b", r"(?P