pydocstring
pydocstring copied to clipboard
Missing support for typing.List etc
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'