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

Add has_docstring param to expressify() #1163

Merged
merged 4 commits into from
Mar 1, 2024
Merged

Add has_docstring param to expressify() #1163

merged 4 commits into from
Mar 1, 2024

Conversation

wch
Copy link
Collaborator

@wch wch commented Feb 28, 2024

Closes #1081.

This allows the user to tell @expressify that the decorated function has a docstring which shouldn't be displayed. For example:

@expressify(has_docstring=True)
def f():
    "This is a docstring. It should not be displayed."
    "This is a regular string. It should be displayed."

f()

I don't love this implementation, and am open to ideas about how to do it more cleanly.

@wch wch added this to the v0.8.0 milestone Feb 28, 2024
@wch wch marked this pull request as ready for review February 29, 2024 23:13
@wch wch requested a review from jcheng5 February 29, 2024 23:14
@wch wch merged commit af891a6 into main Mar 1, 2024
10 checks passed
@wch wch deleted the expressify-docstring branch March 1, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@expressify should have an option to ignore docstrings
1 participant