Skip to content

Update docstring to reflect default setting in annotations #13304

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

Merged
merged 4 commits into from
Jul 2, 2025

Conversation

teonbrooks
Copy link
Member

Fixes #13295.

What does this implement/fix?

I modified the base docstring to signal the potential difference in default. It seems like all the other methods do default to None except the one for annotations. Instead of removing the default base docstring for all the other methods, I modified it to read unless otherwise specified and then added the specification to the annotation method.

Additional information

@drammock
Copy link
Member

drammock commented Jul 1, 2025

CI error suggests that the new bit is being treated as a separate param entry instead of part of the prior entry:

FAILED mne/tests/test_docstring_parameters.py::test_docstring_parameters - AssertionError: 2 errors found:
mne : mne.annotations.Annotations.to_data_frame : PR02 : Unknown parameters {'Default is ``datetime``.'}
mne : mne.annotations.Annotations.to_data_frame : PR07 : Parameter "Default is ``datetime``." has no description

debug locally with pytest mne/tests/test_docstring_parameters.py

doc build failure is same issue.

@drammock
Copy link
Member

drammock commented Jul 2, 2025

current doc build fix is unrelated, I'll push a commit shortly to deal with it

@drammock
Copy link
Member

drammock commented Jul 2, 2025

all green! thanks @teonbrooks

@drammock drammock merged commit d193166 into mne-tools:main Jul 2, 2025
33 of 34 checks passed
@teonbrooks teonbrooks deleted the dev-docstring branch July 2, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Docstring for Annotations.to_data_frame has conflicting information to the method itself
2 participants