Closed
Description
- Are you reporting a bug, or opening a feature request?
BUG
- Please insert below the code you are checking with mypy,
import abc
class A(abc.ABC):
@abc.abstractmethod
def f(self): pass
# Cannot instantiate abstract class 'A' with abstract attribute 'f'
a = A()
# Cannot instantiate abstract class 'A' with abstract attribute 'f'
al = lambda: A()
# No warnings
def af():
return A()
https://mypy-play.net/?mypy=latest&python=3.8&gist=fbc0513ec90bda028634ade70ff698e2
- What is the actual behavior/output?
See comments above.
- What is the behavior/output you expect?
I expect the "Cannot instantiate abstract class [...]" warning in all three cases.
Metadata
Metadata
Assignees
Labels
No labels