Skip to content

MAINT: DRY our docstrings #5753

@larsoner

Description

@larsoner

We could vendor doccer from SciPy to do things like this:

https://github.com/scipy/scipy/blob/69cfe48f37f08c71bc571956b4d044e4c5107e37/scipy/ndimage/filters.py#L54-L71

It should reduce code dup without hurting readability much. I actually think it will help readability in the long run since you 1) immediately know it's a standard MNE param and 2) there is less docstring to skip through / ignore to see the actual code.

If it seems worthwhile, I can make a quick PR to do this for verbose, and then incorporate it in #4511 for picks. Eventually it could also help with n_jobs (two flavors probably: cuda-allowed and cpu-only) and probably other params, too. It seems like it would cut down on a lot of otherwise unnecessary code (docstring) dup in the long run, and probably wouldn't make too much rebase difficulty in the meantime.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions