Open
Description
I can't work out how to satisfy GL09 when including a deprecation notice.
Demonstration
For example:
file "sample_code.py"
def my_func_wrong():
"""Compute my function.
What it does in more detail.
.. deprecated:: v0.1
This function is listed for future removal.
"""
pass
def my_func_right():
"""Compute my function.
.. deprecated:: v0.1
This function is listed for future removal.
What it does in more detail.
"""
pass
produces ...
+-----------------------------------------------+---------------------------+---------+---------------------------------------------+
| file | item | check | description |
+===============================================+===========================+=========+=============================================+
| lib/iris/experimental/ugrid/sample_code.py:1 | sample_code.my_func_wrong | GL09 | Deprecation warning should precede extended |
| | | | summary |
+-----------------------------------------------+---------------------------+---------+---------------------------------------------+
| lib/iris/experimental/ugrid/sample_code.py:11 | sample_code.my_func_right | GL09 | Deprecation warning should precede extended |
| | | | summary |
+-----------------------------------------------+---------------------------+---------+---------------------------------------------+
Expected
I think the form in "my_func_right" ought to pass OK.
Workaround
For now, in the Iris project, we are putting all our "deprecated" sections within a "Notes" section,
and have been since we since we adopted numpydoc-validation in pre-commit.
For example here
But this feels like a kluge.
Metadata
Metadata
Assignees
Labels
No labels