From 0e0109774aaa9d2d5b82205ee391c5976bfce520 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 01:42:10 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#564) 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 | 2 +- mne_nirs/statistics/tests/test_statsmodels.py | 4 ++-- mne_nirs/visualisation/tests/test_visualisation.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c11dfb79..51460a72a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # Ruff mne - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.1 + rev: v0.5.2 hooks: - id: ruff args: ["--fix"] diff --git a/mne_nirs/statistics/tests/test_statsmodels.py b/mne_nirs/statistics/tests/test_statsmodels.py index 249c0a6b2..e201189e5 100644 --- a/mne_nirs/statistics/tests/test_statsmodels.py +++ b/mne_nirs/statistics/tests/test_statsmodels.py @@ -46,14 +46,14 @@ def test_statsmodel_to_df(func): df_cha["theta"] = df_cha["theta"] * 1.0e6 roi_model = func("theta ~ -1 + Condition", df_cha, groups=df_cha["ID"]).fit() df = statsmodels_to_results(roi_model) - assert type(df) == pd.DataFrame + assert isinstance(df, pd.DataFrame) assert_allclose(df["Coef."]["Condition[A]"], amplitude, rtol=0.1) assert df["Significant"]["Condition[A]"] assert df.shape == (8, 8) roi_model = smf.rlm("theta ~ -1 + Condition", df_cha, groups=df_cha["ID"]).fit() df = statsmodels_to_results(roi_model) - assert type(df) == pd.DataFrame + assert isinstance(df, pd.DataFrame) assert_allclose(df["Coef."]["Condition[A]"], amplitude, rtol=0.1) assert df["Significant"]["Condition[A]"] assert df.shape == (8, 8) diff --git a/mne_nirs/visualisation/tests/test_visualisation.py b/mne_nirs/visualisation/tests/test_visualisation.py index 2c34d4059..7436a4ebd 100644 --- a/mne_nirs/visualisation/tests/test_visualisation.py +++ b/mne_nirs/visualisation/tests/test_visualisation.py @@ -157,7 +157,7 @@ def test_run_plot_GLM_projection(requires_pyvista): surface="white", subjects_dir=subjects_dir, ) - assert type(brain) == mne.viz._brain.Brain + assert isinstance(brain, mne.viz._brain.Brain) @pytest.mark.parametrize(