diff --git a/mne_icalabel/datasets/icalabel/icalabel.py b/mne_icalabel/datasets/icalabel/icalabel.py index 155dce703..96ad626a0 100644 --- a/mne_icalabel/datasets/icalabel/icalabel.py +++ b/mne_icalabel/datasets/icalabel/icalabel.py @@ -42,7 +42,7 @@ def data_path( download : bool If False and the dataset has not been downloaded yet, it will not be downloaded and the path will be returned - as ‘’ (empty string). This is mostly used for debugging purposes + as ``‘’`` (empty string). This is mostly used for debugging purposes and can be safely ignored by most users. %(verbose)s diff --git a/mne_icalabel/datasets/icalabel/icalabel.pyi b/mne_icalabel/datasets/icalabel/icalabel.pyi index 2763403c5..7ce23dde5 100644 --- a/mne_icalabel/datasets/icalabel/icalabel.pyi +++ b/mne_icalabel/datasets/icalabel/icalabel.pyi @@ -30,7 +30,7 @@ def data_path( download : bool If False and the dataset has not been downloaded yet, it will not be downloaded and the path will be returned - as ‘’ (empty string). This is mostly used for debugging purposes + as ``‘’`` (empty string). This is mostly used for debugging purposes and can be safely ignored by most users. verbose : bool | str | int | None diff --git a/mne_icalabel/iclabel/tests/test_label_components.py b/mne_icalabel/iclabel/tests/test_label_components.py index d804af84a..f9d5c3e97 100644 --- a/mne_icalabel/iclabel/tests/test_label_components.py +++ b/mne_icalabel/iclabel/tests/test_label_components.py @@ -124,14 +124,14 @@ def test_warnings(): random_state=101, ) ica.fit(raw) - with pytest.warns(RuntimeWarning, match="common average reference"): + with pytest.warns(RuntimeWarning, match="common average reference"), pytest.warns( + RuntimeWarning, match="not filtered between 1 and 100 Hz" + ): iclabel_label_components(raw, ica) - with pytest.warns(RuntimeWarning, match="not filtered between 1 and 100 Hz"): - iclabel_label_components(raw, ica) - with raw.info._unlock(): raw.info["lowpass"] = 100.0 raw.set_eeg_reference("average") + # infomax ica = ICA( n_components=3, diff --git a/pyproject.toml b/pyproject.toml index 3d3349129..31bdc6f1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,8 +118,8 @@ test = [ 'pandas', 'pymatreader', 'PyQt6', - 'pytest', 'pytest-cov', + 'pytest>=8.0.0', ] torch = [ 'torch', @@ -185,22 +185,24 @@ match-dir = '^mne_icalabel.*' [tool.pytest.ini_options] addopts = '--durations 20 --junit-xml=junit-results.xml -v --color=yes' junit_family = 'xunit2' -minversion = '6.0' +minversion = '8.0' [tool.ruff] extend-exclude = [ 'doc', 'setup.py', ] -ignore = [] line-length = 88 -select = ["E", "F", "UP", "W"] target-version = 'py39' [tool.ruff.format] docstring-code-format = true -[tool.ruff.per-file-ignores] +[tool.ruff.lint] +ignore = [] +select = ["E", "F", "UP", "W"] + +[tool.ruff.lint.per-file-ignores] '*' = [ "UP007", # 'Use `X | Y` for type annotations', requires python 3.10 ] diff --git a/tools/stubgen.py b/tools/stubgen.py index 3676ef2f0..a0d061b8e 100644 --- a/tools/stubgen.py +++ b/tools/stubgen.py @@ -63,5 +63,5 @@ isort.file(stub, config=config_isort) # run ruff to improve stub style -exec = subprocess.run(["ruff", "format", str(directory), "--config", config]) -sys.exit(exec.returncode) +execution = subprocess.run(["ruff", "format", str(directory), "--config", config]) +sys.exit(execution.returncode)