Skip to content

[RFE] Support container members type specification using square brackets #1886

@radekholy24

Description

@radekholy24

Please add a support for specifying types of members of containers/iterables/sequences/mappings/iterators/generators.
Use case:
Imagine that there is a function that accepts only mappings from str to list of ints. The docstring would look like:

def foo(map):
    """Bar

    :param map: a mapping
    :type map: collections.abc.Mapping[str, list[int]]

    """

Such a syntax is already supported by e.g. PyCharm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions