-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix alphabetical order in overview/people.rst, fix sphinx formatting in docstrings and set verbose to keyword-only #11745
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved but with one question, see below
@@ -385,7 +385,7 @@ def set_channel_types(self, mapping, *, on_unit_change="warn", verbose=None): | |||
mapping : dict | |||
A dictionary mapping channel names to sensor types, e.g., | |||
``{'EEG061': 'eog'}``. | |||
on_unit_change : 'raise' | 'warn' | 'ignore' | |||
on_unit_change : ``'raise'`` | ``'warn'`` | ``'ignore'`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this how we do it elsewhere? I know we're not 100% consistent, but I have a vague memory that we're actually supposed to omit the double-backticks in cases like this 🤔 This is not definitive, but:
$ git grep " : '" | wc -l
117
$ git grep " : \`\`'" | wc -l
26
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we've decided and I looked at numpydoc but it doesn't seem to say
https://numpydoc.readthedocs.io/en/latest/format.html#parameters
In the meantime I think this should render more nicely. In principle maybe numpydoc should autodetect such strings and literal-ify them but I wonder if it would befragile. So maybe we should turn them to literals for now and someday if someone wants to make numpydoc smarter they can, and it's easy enough to replace our instances at that point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I've definitely seen it elsewhere in the codebase, and IMO it renders better. But actually in numpydoc:
When a parameter can only assume one of a fixed set of values,
those values can be listed in braces, with the default appearing first:
order : {'C', 'F', 'A'}
Description of `order`.
Not sure how it renders
* upstream/main: (24 commits) Allow int-like as ID of make_fixed_length_events (mne-tools#11748) Easycap-M43 montage (mne-tools#11744) ENH: Create a Calibrations class for eyetracking data (mne-tools#11719) Fix alphabetical order in overview/people.rst, fix sphinx formatting in docstrings and set verbose to keyword-only (mne-tools#11745) Add Mathieu Scheltienne to MNE-Python Steering Council (mne-tools#11741) removed requirement for curv.*h files to create Brain object (mne-tools#11704) [BUG] Fix mne.viz.Brain.add_volume_labels matrix ordering bug (mne-tools#11730) Fix installer links (mne-tools#11729) MAINT: Update for PyVista deprecation (mne-tools#11727) MAINT: Update roadmap (mne-tools#11724) MAINT: Update download link [skip azp] [skip cirrus] [skip actions] fix case for chpi_info[1] == None (mne-tools#11714) Add cmap argument for mne.viz.utils.plot_sensors (mne-tools#11720) BUG: Fix one more PySide6 bug (mne-tools#11723) MAINT: Fix PySide6 and PyVista compat (mne-tools#11721) MRG: If _check_fname() cannot find a file, display the path in quotation marks to help spot accidental trailing spaces (mne-tools#11718) Add "array-like" to `_validate_type()` (mne-tools#11713) MAINT: Avoid problematic PySide6 (mne-tools#11715) Fix installer links (mne-tools#11709) Updating change log after PR mne-tools#11575 (mne-tools#11707) ...
A couple of minor docstring fixes + 2 verbose arguments now set as keyword-only + the alphabetical order violation picked-up by @drammock today.