Skip to content

Commit

Permalink
Bump ruff to v0.3.0 (#1232)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Appelhoff <[email protected]>
  • Loading branch information
hoechenberger and sappelhoff authored Mar 7, 2024
1 parent 32a0d8b commit 94835b3
Show file tree
Hide file tree
Showing 29 changed files with 32 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
1 change: 1 addition & 0 deletions mne_bids/commands/mne_bids_count_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
example usage: $ mne_bids count_events --bids_root bids_root_path
"""

# Authors: Alex Gramfort <[email protected]>
#
# License: BSD-3-Clause
Expand Down
1 change: 1 addition & 0 deletions mne_bids/commands/mne_bids_cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
example usage: $ mne_bids cp --input myfile.vhdr --output sub-01_task-test.vhdr
"""

# Authors: Stefan Appelhoff <[email protected]>
#
# License: BSD-3-Clause
Expand Down
1 change: 1 addition & 0 deletions mne_bids/commands/mne_bids_raw_to_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
--raw data.edf --bids_root new_path
"""

# Authors: Teon Brooks <[email protected]>
# Stefan Appelhoff <[email protected]>
#
Expand Down
1 change: 1 addition & 0 deletions mne_bids/commands/mne_bids_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
example usage: $ mne_bids report --bids_root bids_root_path
"""

# Authors: Alexandre Gramfort <[email protected]>
#
# License: BSD-3-Clause
Expand Down
1 change: 1 addition & 0 deletions mne_bids/commands/run.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Command Line Interface for MNE-BIDS."""

# Authors: Teon Brooks <[email protected]>
# Stefan Appelhoff <[email protected]>
#
Expand Down
1 change: 1 addition & 0 deletions mne_bids/commands/tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test command line."""

# Authors: Teon L Brooks <[email protected]>
# Stefan Appelhoff <[email protected]>
#
Expand Down
7 changes: 4 additions & 3 deletions mne_bids/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Configuration values for MNE-BIDS."""

from mne import io
from mne.io.constants import FIFF

Expand Down Expand Up @@ -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."

Expand Down
1 change: 1 addition & 0 deletions mne_bids/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Configure all tests."""

import mne
import pytest

Expand Down
1 change: 1 addition & 0 deletions mne_bids/copyfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
due to internal pointers that are not being updated.
"""

# Authors: Mainak Jas <[email protected]>
# Alexandre Gramfort <[email protected]>
# Teon Brooks <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions mne_bids/dig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Read/write BIDS compatible electrode/coords structures from MNE."""

# Authors: Adam Li <[email protected]>
# Stefan Appelhoff <[email protected]>
# Alex Rockhill <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions mne_bids/path.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""BIDS compatible path functionality."""

# Authors: Adam Li <[email protected]>
# Stefan Appelhoff <[email protected]>
#
Expand Down
1 change: 1 addition & 0 deletions mne_bids/pick.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define coil types for MEG."""

# Authors: Matt Sanderson <[email protected]>
#
# License: BSD-3-Clause
Expand Down
1 change: 1 addition & 0 deletions mne_bids/read.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Check whether a file format is supported by BIDS and then load it."""

# Authors: Mainak Jas <[email protected]>
# Alexandre Gramfort <[email protected]>
# Teon Brooks <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions mne_bids/report/_report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Make BIDS report from dataset and sidecar files."""

# Authors: Adam Li <[email protected]>
#
# License: BSD-3-Clause
Expand Down
1 change: 0 additions & 1 deletion mne_bids/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#
# License: BSD-3-Clause


from mne_bids import BIDSPath, get_datatypes
from mne_bids.config import EPHY_ALLOWED_DATATYPES

Expand Down
1 change: 1 addition & 0 deletions mne_bids/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Configure tests."""

import os
import platform

Expand Down
1 change: 1 addition & 0 deletions mne_bids/tests/test_copyfiles.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Testing copyfile functions."""

# Authors: Chris Holdgraf <[email protected]>
# Mainak Jas <[email protected]>
# Stefan Appelhoff <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions mne_bids/tests/test_path.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test for the MNE BIDSPath functions."""

# Authors: Adam Li <[email protected]>
# Richard Höchenberger <[email protected]>
#
Expand Down
1 change: 1 addition & 0 deletions mne_bids/tests/test_read.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Testing utilities for file io."""

# Authors: Stefan Appelhoff <[email protected]>
#
# License: BSD-3-Clause
Expand Down
1 change: 1 addition & 0 deletions mne_bids/tests/test_report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Testing automatic BIDS report."""

# Authors: Adam Li <[email protected]>
#
# License: BSD-3-Clause
Expand Down
1 change: 0 additions & 1 deletion mne_bids/tests/test_tsv_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
# License: BSD-3-Clause


from collections import OrderedDict as odict

import pytest
Expand Down
1 change: 1 addition & 0 deletions mne_bids/tests/test_update.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test for the MNE BIDS updating of BIDS datasets."""

# Authors: Adam Li <[email protected]>
#
# License: BSD-3-Clause
Expand Down
1 change: 1 addition & 0 deletions mne_bids/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Testing utilities for the MNE BIDS converter."""

# Authors: Chris Holdgraf <[email protected]>
# Mainak Jas <[email protected]>
# Stefan Appelhoff <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions mne_bids/tests/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
For each supported file format, implement a test.
"""

# Authors: Mainak Jas <[email protected]>
# Teon L Brooks <[email protected]>
# Chris Holdgraf <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions mne_bids/tsv_handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Private functions to handle tabular data."""

from collections import OrderedDict
from copy import deepcopy

Expand Down
1 change: 1 addition & 0 deletions mne_bids/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility and helper functions for MNE-BIDS."""

# Authors: Mainak Jas <[email protected]>
# Alexandre Gramfort <[email protected]>
# Teon Brooks <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions mne_bids/write.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Make BIDS compatible directory structures and infer meta data from MNE."""

# Authors: Mainak Jas <[email protected]>
# Alexandre Gramfort <[email protected]>
# Teon Brooks <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 94835b3

Please sign in to comment.