autoDocstring icon indicating copy to clipboard operation
autoDocstring copied to clipboard

Not working properly for class documentation, should add __init__ args & *kwargs to class docstring instead of treating base class as arguments

Open vijay-jangir opened this issue 3 years ago • 1 comments

Describe the bug Not working properly for class documentation, should add init args & *kwargs to class docstring instead of treating base class as arguments

Versions (please complete the following information):

  • autoDocstring Version:0.6.2 (tried with earlier versions as well)
  • Operating System:Mac OS Monterey
  • Vscode Version:1.72.1

Original Code (with line to generate on):

class A(SuperA, SuperB, SuperC):
    def __init__(apple, bat, cat=None):
        pass

Expected Result:

class A(SuperA, SuperB, SuperC):
	"""_summary_

	:param apple: _description_
	:param bat: _description_
	:param cat: _description_, defaults to None
	"""
	def __init__(apple, bat, cat=None):
		pass

Actual Result:

class A(SuperA, SuperB, SuperC):
	"""_summary_

	:param SuperA: _description_
	:param SuperB: _description_
	:param SuperC: _description_
	"""
    def __init__(apple, bat, cat=None):
        pass

Debug log: Set autoDocstring.logLevel to "Debug", recreate the bug, and then copy the debug logs from the autoDocstring output channel.

[INFO 23:37:46.255] Generating Docstring at line: 16
[INFO 23:37:46.257] Docstring generated:
	"""${1:_summary_}

	:param SuperA: ${2:_description_}
	:param SuperB: ${3:_description_}
	:param SuperC: ${4:_description_}
	"""
[INFO 23:37:46.257] Inserting at position: 16 0
[INFO 23:37:46.263] Successfully inserted docstring

Stack trace: If an error was reported by autoDocstring please copy the stack trace from the autoDocstring output channel.


Additional context Add any other context about the problem here.

vijay-jangir avatar Oct 13 '22 18:10 vijay-jangir