From 397f08c6e6d5a3a15cfbb6751a91c73f1fc4cb25 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 21:33:25 +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/pre-commit/mirrors-mypy: v1.11.2 → v1.12.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.11.2...v1.12.1) --- .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 935f9ac183..1fdac33ecb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -73,7 +73,7 @@ repos: - id: codespell args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.12.1 hooks: - id: mypy # Sync with project.optional-dependencies.typing From 269fd7af7ec2dff04b34530057682e33ed0ff226 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Tue, 22 Oct 2024 09:35:27 +0200 Subject: [PATCH 2/2] remove import checks for old pythons --- tools/schemacode/bidsschematools/conftest.py | 6 +----- .../schemacode/bidsschematools/tests/test_make_testdata.py | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/tools/schemacode/bidsschematools/conftest.py b/tools/schemacode/bidsschematools/conftest.py index 2e5eaec86f..2b87854a99 100644 --- a/tools/schemacode/bidsschematools/conftest.py +++ b/tools/schemacode/bidsschematools/conftest.py @@ -1,12 +1,8 @@ import logging import tempfile +from importlib.resources import as_file, files from subprocess import run -try: - from importlib.resources import as_file, files -except ImportError: # PY<3.9 - from importlib_resources import as_file, files - import pytest lgr = logging.getLogger() diff --git a/tools/schemacode/bidsschematools/tests/test_make_testdata.py b/tools/schemacode/bidsschematools/tests/test_make_testdata.py index 5721b630d6..8ef6443d8d 100644 --- a/tools/schemacode/bidsschematools/tests/test_make_testdata.py +++ b/tools/schemacode/bidsschematools/tests/test_make_testdata.py @@ -1,10 +1,6 @@ import os import shutil - -try: - from importlib.resources import files -except ImportError: # PY<3.9 - from importlib_resources import files +from importlib.resources import files import pytest