diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ce6de8029..326d41b29 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.2 + rev: v0.3.0 hooks: - id: ruff name: ruff mne_bids/ diff --git a/mne_bids/commands/mne_bids_count_events.py b/mne_bids/commands/mne_bids_count_events.py index 225e1fdbb..19ffaa6b9 100644 --- a/mne_bids/commands/mne_bids_count_events.py +++ b/mne_bids/commands/mne_bids_count_events.py @@ -3,6 +3,7 @@ example usage: $ mne_bids count_events --bids_root bids_root_path """ + # Authors: Alex Gramfort # # License: BSD-3-Clause diff --git a/mne_bids/commands/mne_bids_cp.py b/mne_bids/commands/mne_bids_cp.py index 69d4b1e86..63ab7c6af 100644 --- a/mne_bids/commands/mne_bids_cp.py +++ b/mne_bids/commands/mne_bids_cp.py @@ -2,6 +2,7 @@ example usage: $ mne_bids cp --input myfile.vhdr --output sub-01_task-test.vhdr """ + # Authors: Stefan Appelhoff # # License: BSD-3-Clause diff --git a/mne_bids/commands/mne_bids_raw_to_bids.py b/mne_bids/commands/mne_bids_raw_to_bids.py index b2fefe22f..46fea2532 100644 --- a/mne_bids/commands/mne_bids_raw_to_bids.py +++ b/mne_bids/commands/mne_bids_raw_to_bids.py @@ -4,6 +4,7 @@ --raw data.edf --bids_root new_path """ + # Authors: Teon Brooks # Stefan Appelhoff # diff --git a/mne_bids/commands/mne_bids_report.py b/mne_bids/commands/mne_bids_report.py index f550869e9..f27063291 100644 --- a/mne_bids/commands/mne_bids_report.py +++ b/mne_bids/commands/mne_bids_report.py @@ -3,6 +3,7 @@ example usage: $ mne_bids report --bids_root bids_root_path """ + # Authors: Alexandre Gramfort # # License: BSD-3-Clause diff --git a/mne_bids/commands/run.py b/mne_bids/commands/run.py index c1c382950..d0996db58 100755 --- a/mne_bids/commands/run.py +++ b/mne_bids/commands/run.py @@ -1,4 +1,5 @@ """Command Line Interface for MNE-BIDS.""" + # Authors: Teon Brooks # Stefan Appelhoff # diff --git a/mne_bids/commands/tests/test_cli.py b/mne_bids/commands/tests/test_cli.py index 8355c7668..20101fa28 100644 --- a/mne_bids/commands/tests/test_cli.py +++ b/mne_bids/commands/tests/test_cli.py @@ -1,4 +1,5 @@ """Test command line.""" + # Authors: Teon L Brooks # Stefan Appelhoff # diff --git a/mne_bids/config.py b/mne_bids/config.py index 4f85da3a7..7941cbb2c 100644 --- a/mne_bids/config.py +++ b/mne_bids/config.py @@ -1,4 +1,5 @@ """Configuration values for MNE-BIDS.""" + from mne import io from mne.io.constants import FIFF @@ -444,9 +445,9 @@ for letter in ("a", "b", "c"): for sym in ("Sym", "Asym"): - BIDS_COORD_FRAME_DESCRIPTIONS[ - f"mni152nlin2009{letter}{sym}" - ] = "Also known as ICBM (non-linear coregistration with 40 iterations," + BIDS_COORD_FRAME_DESCRIPTIONS[f"mni152nlin2009{letter}{sym}"] = ( + "Also known as ICBM (non-linear coregistration with 40 iterations," + ) " released in 2009). It comes in either three different flavours " "each in symmetric or asymmetric version." diff --git a/mne_bids/conftest.py b/mne_bids/conftest.py index 0cbcfd5e2..46948d2df 100644 --- a/mne_bids/conftest.py +++ b/mne_bids/conftest.py @@ -1,4 +1,5 @@ """Configure all tests.""" + import mne import pytest diff --git a/mne_bids/copyfiles.py b/mne_bids/copyfiles.py index 5455ed83f..dc82c1eaf 100644 --- a/mne_bids/copyfiles.py +++ b/mne_bids/copyfiles.py @@ -6,6 +6,7 @@ due to internal pointers that are not being updated. """ + # Authors: Mainak Jas # Alexandre Gramfort # Teon Brooks diff --git a/mne_bids/dig.py b/mne_bids/dig.py index 8dba5a4bd..1b372fa00 100644 --- a/mne_bids/dig.py +++ b/mne_bids/dig.py @@ -1,4 +1,5 @@ """Read/write BIDS compatible electrode/coords structures from MNE.""" + # Authors: Adam Li # Stefan Appelhoff # Alex Rockhill diff --git a/mne_bids/path.py b/mne_bids/path.py index 39e6d5bb1..181fc221c 100644 --- a/mne_bids/path.py +++ b/mne_bids/path.py @@ -1,4 +1,5 @@ """BIDS compatible path functionality.""" + # Authors: Adam Li # Stefan Appelhoff # diff --git a/mne_bids/pick.py b/mne_bids/pick.py index c9b4baad6..a351d131f 100644 --- a/mne_bids/pick.py +++ b/mne_bids/pick.py @@ -1,4 +1,5 @@ """Define coil types for MEG.""" + # Authors: Matt Sanderson # # License: BSD-3-Clause diff --git a/mne_bids/read.py b/mne_bids/read.py index 10d14f204..365cdd220 100644 --- a/mne_bids/read.py +++ b/mne_bids/read.py @@ -1,4 +1,5 @@ """Check whether a file format is supported by BIDS and then load it.""" + # Authors: Mainak Jas # Alexandre Gramfort # Teon Brooks diff --git a/mne_bids/report/_report.py b/mne_bids/report/_report.py index 3cca23d96..cb681c316 100644 --- a/mne_bids/report/_report.py +++ b/mne_bids/report/_report.py @@ -1,4 +1,5 @@ """Make BIDS report from dataset and sidecar files.""" + # Authors: Adam Li # # License: BSD-3-Clause diff --git a/mne_bids/stats.py b/mne_bids/stats.py index 3e6c2bcca..50931b005 100644 --- a/mne_bids/stats.py +++ b/mne_bids/stats.py @@ -4,7 +4,6 @@ # # License: BSD-3-Clause - from mne_bids import BIDSPath, get_datatypes from mne_bids.config import EPHY_ALLOWED_DATATYPES diff --git a/mne_bids/tests/conftest.py b/mne_bids/tests/conftest.py index 0a05c1699..b774085ee 100644 --- a/mne_bids/tests/conftest.py +++ b/mne_bids/tests/conftest.py @@ -1,4 +1,5 @@ """Configure tests.""" + import os import platform diff --git a/mne_bids/tests/test_copyfiles.py b/mne_bids/tests/test_copyfiles.py index a5b08fcce..1e83307a4 100644 --- a/mne_bids/tests/test_copyfiles.py +++ b/mne_bids/tests/test_copyfiles.py @@ -1,4 +1,5 @@ """Testing copyfile functions.""" + # Authors: Chris Holdgraf # Mainak Jas # Stefan Appelhoff diff --git a/mne_bids/tests/test_path.py b/mne_bids/tests/test_path.py index efe449c7c..26a293823 100644 --- a/mne_bids/tests/test_path.py +++ b/mne_bids/tests/test_path.py @@ -1,4 +1,5 @@ """Test for the MNE BIDSPath functions.""" + # Authors: Adam Li # Richard Höchenberger # diff --git a/mne_bids/tests/test_read.py b/mne_bids/tests/test_read.py index 7160a4b25..ca83298ad 100644 --- a/mne_bids/tests/test_read.py +++ b/mne_bids/tests/test_read.py @@ -1,4 +1,5 @@ """Testing utilities for file io.""" + # Authors: Stefan Appelhoff # # License: BSD-3-Clause diff --git a/mne_bids/tests/test_report.py b/mne_bids/tests/test_report.py index 59091b88a..5788d0188 100644 --- a/mne_bids/tests/test_report.py +++ b/mne_bids/tests/test_report.py @@ -1,4 +1,5 @@ """Testing automatic BIDS report.""" + # Authors: Adam Li # # License: BSD-3-Clause diff --git a/mne_bids/tests/test_tsv_handler.py b/mne_bids/tests/test_tsv_handler.py index 2241fff59..cd353c755 100644 --- a/mne_bids/tests/test_tsv_handler.py +++ b/mne_bids/tests/test_tsv_handler.py @@ -3,7 +3,6 @@ # # License: BSD-3-Clause - from collections import OrderedDict as odict import pytest diff --git a/mne_bids/tests/test_update.py b/mne_bids/tests/test_update.py index 92b30658b..a9a734d38 100644 --- a/mne_bids/tests/test_update.py +++ b/mne_bids/tests/test_update.py @@ -1,4 +1,5 @@ """Test for the MNE BIDS updating of BIDS datasets.""" + # Authors: Adam Li # # License: BSD-3-Clause diff --git a/mne_bids/tests/test_utils.py b/mne_bids/tests/test_utils.py index 7a018caf1..044db417a 100644 --- a/mne_bids/tests/test_utils.py +++ b/mne_bids/tests/test_utils.py @@ -1,4 +1,5 @@ """Testing utilities for the MNE BIDS converter.""" + # Authors: Chris Holdgraf # Mainak Jas # Stefan Appelhoff diff --git a/mne_bids/tests/test_write.py b/mne_bids/tests/test_write.py index 92c601fc4..3edf2b879 100644 --- a/mne_bids/tests/test_write.py +++ b/mne_bids/tests/test_write.py @@ -2,6 +2,7 @@ For each supported file format, implement a test. """ + # Authors: Mainak Jas # Teon L Brooks # Chris Holdgraf diff --git a/mne_bids/tsv_handler.py b/mne_bids/tsv_handler.py index 91e312ab3..3ce4b60d8 100644 --- a/mne_bids/tsv_handler.py +++ b/mne_bids/tsv_handler.py @@ -1,4 +1,5 @@ """Private functions to handle tabular data.""" + from collections import OrderedDict from copy import deepcopy diff --git a/mne_bids/utils.py b/mne_bids/utils.py index 351e2dfe4..218467e48 100644 --- a/mne_bids/utils.py +++ b/mne_bids/utils.py @@ -1,4 +1,5 @@ """Utility and helper functions for MNE-BIDS.""" + # Authors: Mainak Jas # Alexandre Gramfort # Teon Brooks diff --git a/mne_bids/write.py b/mne_bids/write.py index c42d0179c..5fe41dbf5 100644 --- a/mne_bids/write.py +++ b/mne_bids/write.py @@ -1,4 +1,5 @@ """Make BIDS compatible directory structures and infer meta data from MNE.""" + # Authors: Mainak Jas # Alexandre Gramfort # Teon Brooks diff --git a/pyproject.toml b/pyproject.toml index 8252d0a67..f8c41521b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ full = [ "pandas >= 1.3.2", "EDFlib-Python >= 1.0.6", # drop once mne <1.7 is no longer supported "edfio >= 0.2.1", - "defusedxml", # For reading EGI MFF data abd BrainVision monatges + "defusedxml", # For reading EGI MFF data abd BrainVision monatges ] # Dependencies for running the test infrastructure @@ -107,11 +107,11 @@ exclude = [ source = "vcs" raw-options = { version_scheme = "release-branch-semver" } -[tool.ruff] +[tool.ruff.lint] select = ["E", "F", "W", "D", "I"] exclude = ["__init__.py"] -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "numpy" [tool.coverage.run]