From 7c5ab0a9fb4c2e5f2fd3cfa05cef9d3ec05b94f8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 16:47:19 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#11883) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Eric Larson --- .pre-commit-config.yaml | 4 ++-- mne/minimum_norm/resolution_matrix.py | 2 +- mne/tests/test_source_estimate.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19d9df63894..d72855b77b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: # Ruff mne - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.282 + rev: v0.0.284 hooks: - id: ruff name: ruff mne @@ -15,7 +15,7 @@ repos: # Ruff tutorials and examples - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.282 + rev: v0.0.284 hooks: - id: ruff name: ruff tutorials and examples diff --git a/mne/minimum_norm/resolution_matrix.py b/mne/minimum_norm/resolution_matrix.py index fcccc6d66a9..7f9364d7e19 100644 --- a/mne/minimum_norm/resolution_matrix.py +++ b/mne/minimum_norm/resolution_matrix.py @@ -139,7 +139,7 @@ def _get_psf_ctf( for verts in verts_all: # get relevant PSFs or CTFs for specified vertices - if type(verts) is int: + if isinstance(verts, int): verts = [verts] # to keep array dimensions funcs = resmat[:, verts] diff --git a/mne/tests/test_source_estimate.py b/mne/tests/test_source_estimate.py index 5c3cac8ed76..8763d4ed026 100644 --- a/mne/tests/test_source_estimate.py +++ b/mne/tests/test_source_estimate.py @@ -405,13 +405,13 @@ def attempt_assignment(stc, attr, val): # Changing .tmin or .tstep re-computes .times stc.tmin = 1 - assert type(stc.tmin) == float + assert isinstance(stc.tmin, float) assert_array_almost_equal( stc.times, [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9] ) stc.tstep = 1 - assert type(stc.tstep) == float + assert isinstance(stc.tstep, float) assert_array_almost_equal( stc.times, [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0] )