mne-tools / mne-bids-pipeline

Automatically process entire electrophysiological datasets using MNE-Python.
https://mne.tools/mne-bids-pipeline/
BSD 3-Clause "New" or "Revised" License
133 stars 65 forks source link

Drop support for Python 3.9, drop `Optional` and `Union` from type hints #908

Closed hoechenberger closed 3 months ago

hoechenberger commented 3 months ago

Fixes #906

@larsoner I simply had to change the min. Python version in pyproject.toml and run ruff; only two additional manual interventions were required after that. Super nice.

Before merging …

hoechenberger commented 3 months ago

Diff for the config file really shows how much more readable things are now: https://github.com/mne-tools/mne-bids-pipeline/pull/908/files#diff-ab728fad8c0aee89735be8e90dda245e871f17892fc41d1b3a7377e3eccf58f7

hoechenberger commented 3 months ago

@larsoner I assume this line / regexp needs to be changed:

https://github.com/mne-tools/mne-bids-pipeline/blob/ed5939a1d8c820197c0d69d5455693c5b4898e43/docs/source/settings/gen_settings.py#L111

to accommodate the way the type for noise_cov is specified now:

noise_cov: (
    ...
) = ...

But I couldn't get it to work so far :(

larsoner commented 3 months ago

Marking for merge-when-green, we'll see if my re tweak works 🤞 Thanks in advance @hoechenberger !