From d77597ae4e3e1405bcd82cc7963630d3b341595e Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Thu, 7 Dec 2023 17:28:30 +0100
Subject: [PATCH] [setup] Require python>=3.10

---
 .pre-commit-config.yaml | 14 +++++++-------
 doc/example_alias.py    |  1 -
 doc/example_cli.py      |  1 -
 src/clapper/click.py    |  1 -
 src/clapper/config.py   |  1 -
 src/clapper/logging.py  |  6 ++----
 src/clapper/rc.py       |  1 -
 tests/test_click.py     |  2 +-
 8 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 8e263f5..8896d02 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -6,11 +6,11 @@
 # See https://pre-commit.com/hooks.html for more hooks
 repos:
   - repo: https://github.com/psf/black
-    rev: 23.1.0
+    rev: 23.11.0
     hooks:
       - id: black
   - repo: https://github.com/pycqa/docformatter
-    rev: v1.5.1
+    rev: v1.7.5
     hooks:
       - id: docformatter
   - repo: https://github.com/pycqa/isort
@@ -18,11 +18,11 @@ repos:
     hooks:
       - id: isort
   - repo: https://github.com/pycqa/flake8
-    rev: 6.0.0
+    rev: 6.1.0
     hooks:
       - id: flake8
   - repo: https://github.com/pre-commit/mirrors-mypy
-    rev: v1.0.0
+    rev: v1.7.1
     hooks:
     - id: mypy
       args: [
@@ -33,12 +33,12 @@ repos:
       ]
       exclude: '^.*/data/second_config\.py$'
   - repo: https://github.com/asottile/pyupgrade
-    rev: v3.3.1
+    rev: v3.15.0
     hooks:
     - id: pyupgrade
       args: [--py38-plus]
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v4.4.0
+    rev: v4.5.0
     hooks:
       - id: check-ast
       - id: check-added-large-files
@@ -51,6 +51,6 @@ repos:
       - id: end-of-file-fixer
       - id: debug-statements
   - repo: https://github.com/fsfe/reuse-tool
-    rev: v1.1.2
+    rev: v2.1.0
     hooks:
       - id: reuse
diff --git a/doc/example_alias.py b/doc/example_alias.py
index 9072989..b4d45c0 100644
--- a/doc/example_alias.py
+++ b/doc/example_alias.py
@@ -1,7 +1,6 @@
 # SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
 #
 # SPDX-License-Identifier: BSD-3-Clause
-
 """An example script to demonstrate config-file option readout."""
 
 # To improve loading performance, we recommend you only import the very
diff --git a/doc/example_cli.py b/doc/example_cli.py
index 884b077..1db77c7 100644
--- a/doc/example_cli.py
+++ b/doc/example_cli.py
@@ -1,7 +1,6 @@
 # SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
 #
 # SPDX-License-Identifier: BSD-3-Clause
-
 """An example script to demonstrate config-file option readout."""
 
 # To improve loading performance, we recommend you only import the very
diff --git a/src/clapper/click.py b/src/clapper/click.py
index 05d4884..38479ff 100644
--- a/src/clapper/click.py
+++ b/src/clapper/click.py
@@ -1,7 +1,6 @@
 # SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
 #
 # SPDX-License-Identifier: BSD-3-Clause
-
 """Helpers to build command-line interfaces (CLI) via :py:mod:`click`."""
 
 from __future__ import annotations
diff --git a/src/clapper/config.py b/src/clapper/config.py
index 8dcabc1..3dd2fe7 100644
--- a/src/clapper/config.py
+++ b/src/clapper/config.py
@@ -1,7 +1,6 @@
 # SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
 #
 # SPDX-License-Identifier: BSD-3-Clause
-
 """Functionality to implement python-based config file parsing and loading."""
 
 from __future__ import annotations
diff --git a/src/clapper/logging.py b/src/clapper/logging.py
index f00d44d..eb9ad02 100644
--- a/src/clapper/logging.py
+++ b/src/clapper/logging.py
@@ -1,8 +1,7 @@
 # SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
 #
 # SPDX-License-Identifier: BSD-3-Clause
-
-""":py:class:`logging.Logger` setup and stream separation"""
+""":py:class:`logging.Logger` setup and stream separation."""
 
 import logging
 import sys
@@ -12,8 +11,7 @@ import typing
 # debug and info messages are written to sys.stdout
 class _InfoFilter(logging.Filter):
     """Filter-class to delete any log-record with level above
-    :any:`logging.INFO` **before** reaching the handler.
-    """
+    :any:`logging.INFO` **before** reaching the handler."""
 
     def __init__(self):
         super().__init__()
diff --git a/src/clapper/rc.py b/src/clapper/rc.py
index 3a93898..f709038 100644
--- a/src/clapper/rc.py
+++ b/src/clapper/rc.py
@@ -1,7 +1,6 @@
 # SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
 #
 # SPDX-License-Identifier: BSD-3-Clause
-
 """Implements a global configuration system setup and readout."""
 
 from __future__ import annotations
diff --git a/tests/test_click.py b/tests/test_click.py
index 6ce1844..3b6f4fc 100644
--- a/tests/test_click.py
+++ b/tests/test_click.py
@@ -63,7 +63,7 @@ def test_commands_with_config_2():
     @click.command(cls=ConfigCommand, entry_point_group="clapper.test.config")
     @click.option("-a", type=click.INT, cls=ResourceOption)
     def cli(a, **_):
-        assert type(a) == int, (type(a), a)
+        assert isinstance(a, int), (type(a), a)
         click.echo(f"{a}")
 
     runner = CliRunner()
-- 
GitLab