projects
/
idea
/
community.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PY-20125 Epydoc formatter also uses explicit UTF-8 encoding to communicate with the IDE
[idea/community.git]
/
python
/
helpers
/
numpy_formatter.py
1
import textwrap
2
3
import rest_formatter
4
from sphinxcontrib.napoleon.docstring import NumpyDocstring
5
6
7
def main(text=None):
8
src = rest_formatter.read_safe() if text is None else text
9
rest_formatter.main(str(NumpyDocstring(textwrap.dedent(src))))
10
11
12
if __name__ == '__main__':
13
main()