Skip to content
Snippets Groups Projects
Commit d77597ae authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[setup] Require python>=3.10

parent 1ef580a4
No related branches found
No related tags found
No related merge requests found
Pipeline #85435 failed
......@@ -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
# 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
......
# 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
......
# 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
......
# 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
......
# 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__()
......
# 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
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment