robodair / pydocstring Goto Github PK
View Code? Open in Web Editor NEWPython package for autogenerating python docstrings, and switching between common docstring formats
License: MIT License
Python package for autogenerating python docstrings, and switching between common docstring formats
License: MIT License
Got this error when running pydocstring
doc_text = pydocstring.generate_docstring(
File "/usr/local/lib/python3.8/site-packages/pydocstring/__init__.py", line 65, in generate_docstring
return formatter_module.function_docstring(scope)
File "/usr/local/lib/python3.8/site-packages/pydocstring/formatters/google.py", line 46, in function_docstring
*get_return_info(ret, parso_function.annotation))
File "/usr/local/lib/python3.8/site-packages/pydocstring/formatters/format_utils.py", line 61, in get_return_info
expression = "".join(x.get_code().strip() for x in ret.children[1:])
AttributeError: 'Keyword' object has no attribute 'children'
the generation code is def report(loan_data, all_amount=False, balance=False):
Backdrop:
I am trying to build a plugin for Geany.
Its [here] (https://github.com/sagarchalise/geany-pycoding/blob/peasy/peasypycoding.py#L416).
Basically, it calls pydocstring on source content.
Hi!
I wanted to try this module, version 0.2.1 on my linux machine, but when it detects line like:
def configure_channels(self, ch: typing.List[str], all_ch: bool = False):
Then it throws this error
pydocstring -f numpy /home/khazakar/Projects/autorok/autorok/sigrokcli.py '(111, 5)' --debug
(111, 5)
Traceback (most recent call last):
File "/home/khazakar/.local/bin/pydocstring", line 8, in <module>
sys.exit(main())
File "/home/khazakar/.local/lib/python3.8/site-packages/pydocstring/cli.py", line 81, in main
raise ex
File "/home/khazakar/.local/lib/python3.8/site-packages/pydocstring/cli.py", line 75, in main
output = pydocstring.generate_docstring(source,
File "/home/khazakar/.local/lib/python3.8/site-packages/pydocstring/__init__.py", line 65, in generate_docstring
return formatter_module.function_docstring(scope)
File "/home/khazakar/.local/lib/python3.8/site-packages/pydocstring/formatters/numpy.py", line 39, in function_docstring
docstring += " {0} : {1}\n {2}\n".format(*get_param_info(param))
File "/home/khazakar/.local/lib/python3.8/site-packages/pydocstring/formatters/format_utils.py", line 41, in get_param_info
param_type = param.annotation.value if param.annotation else "TYPE"
AttributeError: 'PythonNode' object has no attribute 'value'
I have cloned your repository and then run python setup.py develop --user
. Then I switched to the repository with my project (it is M2Crypto, BTW) and then this happened:
$ pydocstring -f reST M2Crypto/BIO.py
Traceback (most recent call last):
File "/home/matej/.local/bin/pydocstring", line 9, in <module>
load_entry_point('pydocstring==0.0.dev14', 'console_scripts', 'pydocstring')()
File "/home/matej/archiv/knihovna/repos/tmp/pydocstring/pydocstring/cli.py", line 42, in main
print('"""\n' + output + '"""\n')
TypeError: cannot concatenate 'str' and 'NoneType' objects
$
Using python 2.7 on RHEL-7 (if it matters, the same happened with python 3.4.5).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.