-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Subclassing a contextmanager fails #2469
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
Labels
Comments
You can use |
Maybe the same bug, if so this is more general than contextmanager. def arbitrary_decorator(f):
return f
class Foo(object):
@arbitrary_decorator
def bar(self):
# type: () -> int
return 4
class Bar(Foo):
@arbitrary_decorator
def bar(self):
# type: () -> int
return 3
reveal_type(Foo.bar)
reveal_type(Bar.bar) gives
|
Is this a duplicate of #1441? Also is this possibly related to the forward referencing issue listed in #2907 (comment)? |
Yes, this looks like a duplicate of #1441. This likely isn't related to forward references. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fails thus:
The text was updated successfully, but these errors were encountered: