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(