From b35fed7e09bdcc6c5edae255fb4e4001ceca423a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 23:02:50 -0800 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#238) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/PyCQA/autoflake: v2.0.2 → v2.2.1](https://github.com/PyCQA/autoflake/compare/v2.0.2...v2.2.1) - [github.com/asottile/pyupgrade: v3.3.1 → v3.13.0](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.13.0) - [github.com/psf/black: 23.3.0 → 23.9.1](https://github.com/psf/black/compare/23.3.0...23.9.1) - [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](https://github.com/PyCQA/flake8/compare/6.0.0...6.1.0) - [github.com/pre-commit/mirrors-mypy: v1.1.1 → v1.5.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.1.1...v1.5.1) * Remove typing extension version pin * fix linter error E721 --- .pre-commit-config.yaml | 12 ++++++------ tests/test_get_bitinformation.py | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f9e8dce..7b5c7f24 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: mixed-line-ending # This wants to go before isort & flake8 - repo: https://github.com/PyCQA/autoflake - rev: "v2.0.2" + rev: "v2.2.1" hooks: - id: autoflake # isort should run before black as black sometimes tweaks the isort output args: ["--in-place", "--ignore-init-module-imports"] @@ -24,14 +24,14 @@ repos: - id: isort args: ["--profile", "black"] - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.13.0 hooks: - id: pyupgrade args: - "--py38-plus" # https://github.com/python/black#version-control-integration - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.9.1 hooks: - id: black - id: black-jupyter @@ -41,11 +41,11 @@ repos: - id: blackdoc exclude: docs/index.rst - 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.1.1 + rev: v1.5.1 hooks: - id: mypy exclude: "properties|asv_bench" @@ -58,6 +58,6 @@ repos: types-pkg_resources, types-PyYAML, types-pytz, - typing-extensions==3.10.0.0, + typing-extensions, numpy, ] diff --git a/tests/test_get_bitinformation.py b/tests/test_get_bitinformation.py index 0b370d07..5eafe2cb 100644 --- a/tests/test_get_bitinformation.py +++ b/tests/test_get_bitinformation.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - """Tests for `xbitinfo` package.""" import os @@ -33,7 +31,7 @@ def assert_different(a, b): numpy.testing.assert_array_equal """ __tracebackhide__ = True - assert type(a) == type(b) + assert isinstance(a, type(b)) if isinstance(a, (Variable, DataArray)): assert not a.equals(b), formatting.diff_array_repr(a, b, "equals") elif isinstance(a, Dataset):