Skip to content

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

@nineteendo

Description

@nineteendo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions