Skip to content
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

Fixing docstr warnings #1277

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.5.1
rev: v0.5.2
hooks:
- id: ruff
name: ruff mne_bids/
Expand Down
22 changes: 11 additions & 11 deletions mne_bids/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ def update(self, *, check=None, **kwargs):
If a boolean, controls whether to enforce BIDS conformity. This
will set the ``.check`` attribute accordingly. If ``None``, rely on
the existing ``.check`` attribute instead, which is set upon
`mne_bids.BIDSPath` instantiation. Defaults to ``None``.
:class:`BIDSPath` instantiation. Defaults to ``None``.
**kwargs : dict
It can contain updates for valid BIDSPath entities:
'subject', 'session', 'task', 'acquisition', 'processing', 'run',
Expand All @@ -916,7 +916,7 @@ def update(self, *, check=None, **kwargs):
Examples
--------
If one creates a bids basename using
:func:`mne_bids.BIDSPath`:
:class:`BIDSPath`:

>>> bids_path = BIDSPath(subject='test', session='two',
... task='mytask', suffix='channels',
Expand Down Expand Up @@ -1018,12 +1018,12 @@ def match(self, ignore_json=True, check=False):
check : bool
If ``True``, only returns paths that conform to BIDS. If ``False``
(default), the ``.check`` attribute of the returned
`mne_bids.BIDSPath` object will be set to ``True`` for paths that
:class:`BIDSPath` object will be set to ``True`` for paths that
do conform to BIDS, and to ``False`` for those that don't.

Returns
-------
bids_paths : list of mne_bids.BIDSPath
bids_paths : list of BIDSPath
The matching paths.
"""
if self.root is None:
Expand Down Expand Up @@ -1122,7 +1122,7 @@ def find_empty_room(self, use_sidecar_only=False, *, verbose=None):
"""Find the corresponding empty-room file of an MEG recording.

This will only work if the ``.root`` attribute of the
:class:`mne_bids.BIDSPath` instance has been set.
:class:`BIDSPath` instance has been set.

Parameters
----------
Expand Down Expand Up @@ -1581,9 +1581,9 @@ def get_bids_path_from_fname(fname, check=True, verbose=None):
Parameters
----------
fname : path-like
The path to parse a `BIDSPath` from.
The path to parse a :class:`BIDSPath` from.
check : bool
Whether to check if the generated `BIDSPath` complies with the BIDS
Whether to check if the generated :class:`BIDSPath` complies with the BIDS
specification, i.e., whether all included entities and the suffix are
valid.
%(verbose)s
Expand Down Expand Up @@ -2382,12 +2382,12 @@ def find_matching_paths(
check : bool
If ``True``, only returns paths that conform to BIDS. If ``False``
(default), the ``.check`` attribute of the returned
`mne_bids.BIDSPath` object will be set to ``True`` for paths that
:class:`BIDSPath` object will be set to ``True`` for paths that
do conform to BIDS, and to ``False`` for those that don't.

Returns
-------
bids_paths : list of mne_bids.BIDSPath
bids_paths : list of BIDSPath
The matching paths.

"""
Expand Down Expand Up @@ -2459,12 +2459,12 @@ def _fnames_to_bidspaths(fnames, root, check=False):
check : bool
If ``True``, only returns paths that conform to BIDS. If ``False``
(default), the ``.check`` attribute of the returned
`mne_bids.BIDSPath` object will be set to ``True`` for paths that
:class:`BIDSPath` object will be set to ``True`` for paths that
do conform to BIDS, and to ``False`` for those that don't.

Returns
-------
bids_paths : list of mne_bids.BIDSPath
bids_paths : list of BIDSPath
Bids paths.

"""
Expand Down
Loading