Open
Description
Hi again ...
So I wanted to pitch improving the example/doctest (https://docs.python.org/3/library/doctest.html) support
in the library.
Right now the behavior is pretty ... not great.
This ....
def my_function(lst):
"""
>>> my_function([1, 1,
... 1,2,3,3,4, 5])
"processed [1,1,1,2,3,3,4,5]"
"""
return "processed " + str(lst)
Becomes ....
def my_function(lst):
"""
>>> my_function([1, 1,.
... 1,2,3,3,4, 5])
"processed [1,1,1,2,3,3,4,5]"
"""
return "processed " + str(lst)
I am proposing ...
- adding support for this type of expressions
- if possible 'blackening' the code
- in the case of numpydocs, make sure it is inside an
Examples
section (https://numpydoc.readthedocs.io/en/v1.4.0/format.html#examples)
Ideal output for reference:
def my_function(lst):
"""
>>> my_function([1,1,1,2,3,3,4,5])
"processed [1,1,1,2,3,3,4,5]"
"""
return "processed " + str(lst)
Metadata
Metadata
Assignees
Labels
No labels