scikit-image icon indicating copy to clipboard operation
scikit-image copied to clipboard

Remove obsolete `doctest_skip_parser`

Open lagru opened this issue 10 months ago • 2 comments

Description

Noticed this while reviewing #7678. This decorator isn't used anywhere right now. Since we use docstest-plus an alternative to this exists, e.g. pre-pending

.. testsetup::
    >>> import pytest; _ = pytest.importorskip('matplotlib')

to a docstring example.

I can totally see that the above solution has the disadvantage of adding noise to the docstring. It's hidden in HTML and PyCharm's peek feature but might show up in other places, e.g. with help(func). So take this PR as a trigger to discuss whether we want to restart using doctest_skip_parser explicitly or remove it.

Checklist

Release note

For maintainers and optionally contributors, please refer to the instructions on how to document this PR for the release notes.

...

lagru avatar Mar 08 '25 17:03 lagru

I'm not sure about this; it introduces noise in the docstrings that users (the primary target of the docstrings) won't know how to process.

stefanv avatar Mar 08 '25 22:03 stefanv

I'm fine with that. But then we should probably update our existing uses of .. testsetup::. Apparently nobody of us remembered that function when we introduced those changes not too long ago. :smile:

I'll leave this open as a reminder until somebody or me get's around to this.

lagru avatar Mar 11 '25 15:03 lagru

Superseded by the work-in-progress approach in #7814.

lagru avatar Jun 23 '25 13:06 lagru