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

Callable type is missing the __signature__ attribute #598

Closed
jrideout opened this issue Dec 7, 2018 · 2 comments
Closed

Callable type is missing the __signature__ attribute #598

jrideout opened this issue Dec 7, 2018 · 2 comments

Comments

@jrideout
Copy link

jrideout commented Dec 7, 2018

from typing import Callable

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

mypy returns:

error: "Callable[..., Any]" has no attribute "__signature__"
@jrideout
Copy link
Author

jrideout commented Dec 7, 2018

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

@ilevkivskyi
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants