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

rtype of function that returns None is injected into code block #480

Closed
nineteendo opened this issue Sep 11, 2024 · 1 comment · Fixed by #482
Closed

rtype of function that returns None is injected into code block #480

nineteendo opened this issue Sep 11, 2024 · 1 comment · Fixed by #482

Comments

@nineteendo
Copy link

Example: https://jsonyx.readthedocs.io/en/latest/api/jsonyx.dump.html

def dump(...) -> None:
    r"""Serialize a Python object to an open JSON file.

    :raises TypeError: for unserializable values
    :raises ValueError: for invalid values

    >>> import jsonyx as json
    >>> json.dump(["foo", {"bar": ("baz", None, 1.0, 2)}])
    ["foo", {"bar": ["baz", null, 1.0, 2]}]
    >>> from io import StringIO
    >>> io = StringIO()
    >>> json.dump(["streaming API"], io)
    >>> io.getvalue()
    '["streaming API"]\n'
    """
Screenshot 2024-09-11 at 19 46 12
hoodmane added a commit to hoodmane/sphinx-autodoc-typehints that referenced this issue Sep 12, 2024
@hoodmane
Copy link
Collaborator

Buggy docutils strikes again.

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 a pull request may close this issue.

2 participants