Epytext format doctoring
Hi there, I am coming from a PyCharm background and have recently made a move to VS Code. One of the extensions I downloaded was this wonderful autoDocstring but I noticed it is missing the python Epytext docstring style that I have been using in PyCharm. I would like to make a request to have this be one of the available drop down style! Thank you and great extension.
Here is the website for their docstring style: http://epydoc.sourceforge.net/
same request. please. Thanks
Hi @meimchu & @wingmor99 I have created an epytext template in this pr: https://github.com/NilsJPWerner/autoDocstring/pull/95 The documentation for epytext is a little sparse around kwargs and doesn't mention yield so I took some liberties in creating it. If this looks good to you I will merge it in.
Thank you for your timely response. I shall take a look and in the meantime, I did a test in PyCharm passing *args and **kwargs and its Epytext docstring returned as such:
class MyTest():
def __init__(self, *args, **kwargs):
"""
@param args:
@param kwargs:
"""
myTest = MyTest(1, hello="hello", world="world")
According to http://epydoc.sourceforge.net/fields.html though, it seems to suggests @kwarg p:, @kwparam or @keyword p:... so I guess PyCharm is not getting that entirely right either :(
I did a test with args and kwargs. I called on the autoDocstring after creating the function, of course. Evidently something about the args and kwargs is not auto-completing.
def test_func(*args, **kwargs):
"""[summary]
@return: [description]
@rtype: [type]
"""
return args, kwargs
print test_func('1', '2', hello='World')
def test_func(arg_one, arg_two):
"""[summary]
@param arg_one: [description]
@type arg_one: [type]
@param arg_two: [description]
@type arg_two: [type]
@return: [description]
@rtype: [type]
"""
return arg_one, arg_two
print test_func('1', '2')
Hi @meimchu, the extension doesn't really deal with **kwarg. Could you try with a regular kwarg like arg2="abc"?
Could you elaborate what you mean by "regular kwarg"? For example, def test_func(arg1="abc", arg2="xyz"):, similar to my second example posted above, would just mean they're basic parameters, right? The * and ** in front of the parameter, the unpacking operator is what's important. I tried modifying the mustache file to include * and ** to no avail, unfortunately. What is the main difficulty in incorporating those unpacking operators, I'm curious? Really appreciate all your effort so far!
thanks !