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

PR: Remove comments from the function definition lines before generating docstrings #21536

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

rhkarls
Copy link
Contributor

@rhkarls rhkarls commented Nov 17, 2023

Description of Changes

Remove comments from the function definition lines before generating docstrings. Comments are removed, but # symbols inside quotes are kept as these might be default function arguments.

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

Before:
issue_before_fix

With this PR:
issue_after_fix

Issue(s) Resolved

Fixes #21527

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @rhkarls

@ccordoba12 ccordoba12 changed the title PR: Remove comments from the function definition lines before generating docstrings. PR: Remove comments from the function definition lines before generating docstrings Nov 17, 2023
@ccordoba12 ccordoba12 added this to the v6.0alpha3 milestone Nov 17, 2023
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty nice contribution, thanks @rhkarls!

@ccordoba12 ccordoba12 merged commit c749154 into spyder-ide:master Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate docstring not working if there are comments on the function definition lines
2 participants