Closed auscompgeek closed 3 years ago
The Sphinx build shows a warning similar to:
reading sources... [100%] api
[...]/deprecated_demo/sphinx/main.py:docstring of deprecated_demo.sphinx.main.add:7: WARNING: Error in "deprecated" directive:
1 argument(s) required, 0 supplied.
.. deprecated::
The user (who is a developer) can easily fix this problem in its own code.
Problem is though if you specify a reason without a version, there's no warning; the first word is silently considered to be the version.
The Sphinx
versionadded
,versionchanged
, anddeprecated
directives have a non-optionalversion
argument. However, Deprecated will happily generate a Sphinx directive that is missing the version argument:https://github.com/tantale/deprecated/blob/a02525b4f6e112743e1142fc9735dd4d46a4c66e/deprecated/sphinx.py#L100