Odd: "Expected type '() -> None', got '() -> None' instead"

Pycharm 2021.1 community edition shows that very weird message:

"Expected type '() -> None', got '() -> None' instead"

I stared at this for 10 minutes to find the difference between expected and received types, without success.

This happens for the following code (minimal example):

```python

class T1:
def f1(self):
f = self.__init__

```

I am rather confused now.

0

Hi, I can't say the error makes sense to me as well. I've reported the issue here: https://youtrack.jetbrains.com/issue/PY-48827

Feel free to follow, vote and comment.

0

请先登录再写评论。