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

Doc string validation: Add detection of doctests proceeded with only whitespace #11

Open
thorwhalen opened this issue Nov 3, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@thorwhalen
Copy link
Member

image

results in

image

def docs_starts_directly_with_doctest(docstr):
    """Return true if and only if docstr starts directly with a doctest,
    which results in an erroneous rendering in some systems"""
    return bool(re.compile(r'\s*>>>').match(docstr))
@thorwhalen thorwhalen added the enhancement New feature or request label Nov 3, 2021
@thorwhalen thorwhalen self-assigned this Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant