Open
Description
seems similar to #2563, #3482, #8869, #11211, #12673 -- though those are mostly about decorated descriptors
Bug Report
simple, silly example:
class C:
def f(self) -> None: pass
def g(self) -> None:
print(self.f.__func__)
C().g()
Expected Behavior
no error
Actual Behavior
$ ./.venv/bin/mypy t.py
t.py:5: error: "Callable[[], None]" has no attribute "__func__" [attr-defined]
Found 1 error in 1 file (checked 1 source file)
$ ./.venv/bin/mypy --version
mypy 0.991 (compiled: yes)
Your Environment
- Mypy version used:
0.991
- Mypy command-line flags:
N/A
- Mypy configuration options from
mypy.ini
(and other config files):N/A
- Python version used: 3.8.10