Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vijay-jangir opened this issue Oct 13, 2022 · 0 comments
Labels

Comments

@vijay-jangir
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant