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

Untyped decorator causes "signature incompatible with supertype" #2782

Closed
ddfisher opened this issue Jan 31, 2017 · 1 comment
Closed

Untyped decorator causes "signature incompatible with supertype" #2782

ddfisher opened this issue Jan 31, 2017 · 1 comment
Labels
bug mypy got something wrong priority-0-high

Comments

@ddfisher
Copy link
Collaborator

Here's a minimal repro:

from typing import *

# untyped decorator
def deco(f): pass

class A:
    @deco
    def f(self) -> Any:
        pass

class B(A):
    @deco
    def f(self) -> Any:  # E:  Signature of "f" incompatible with supertype "A"
        pass
@ddfisher
Copy link
Collaborator Author

@sixolet I think this may be related to your recent Callable improvements?

@JukkaL JukkaL added bug mypy got something wrong priority-0-high labels Feb 1, 2017
sixolet added a commit to sixolet/mypy that referenced this issue Feb 18, 2017
Previously, we were bailing out with an error because we thought that overriding
a non-method type with a method type was bad.

This comes up when you have an untyped decorator on a supertype method.

python#2782
sixolet added a commit to sixolet/mypy that referenced this issue Feb 18, 2017
Previously, we were bailing out with an error because we thought that overriding
a non-method type with a method type was bad.

This comes up when you have an untyped decorator on a supertype method.

python#2782
@JukkaL JukkaL closed this as completed in 0bb2d16 Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong priority-0-high
Projects
None yet
Development

No branches or pull requests

2 participants