Skip to content

Callable type is missing the __signature__ attribute #598

Closed

Description

@jrideout
from typing import Callable

def test(f: Callable) -> None:
    f.__signature__ = ''

mypy returns:

error: "Callable[..., Any]" has no attribute "__signature__"

Activity

  1. jrideout commented on Dec 7, 2018

    @jrideout
    Author

    I'm dealing with issues related to #270, but it seems regardless of what direction that goes __signature__ should be a recognized attribute of Callable

  2. ilevkivskyi commented on Dec 7, 2018

    @ilevkivskyi
    Member

    This is not really a typing problem, but a mypy problem. Essentially, this is just a duplicate of python/mypy#5958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions