Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[feature request] Support ellipsis (...) like Callable when we want untyped arguments #1234

Closed
@wittekm

Description

@wittekm

Hi all,

It would be nice if MyPy supported a similar ellipsis notation to typing.Callable.

From the typing docs,

It is possible to declare the return type of a callable without specifying the call signature by substituting a literal ellipsis for the list of arguments in the type hint: Callable[..., ReturnType].

It would be nice if MyPy supported something similar - i.e.
# type: ... -> ReturnType
or
# type: (...) -> ReturnType

Which would basically evaluate the same way as # type: (Any, Any, Any, Any) -> ConcreteType for a 4-argument function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions