Stack Exchange
Expected type ..., got 'property' instead
I have a class which have method wrapped by two decorators @classmethod and @property.
class Foo:
    @classmethod
    @property
    def status(cls) -> bool:
        return True

def print_status(status: bool) -> None:
    print(f'{Foo.status=}')

print_status(Foo.status)  # Foo.status=True

But it PyCharm i see warning Expected type 'bool', got 'property' instead :

It works as expected, just want to understand why this warning appears even with annotated functions?
> PyCharm 2023.1.2 (Community Edition) Build #PC-231.9011.38, built on
> May 17, 2023 Runtime version: 17.0.6+10-b829.9 amd64 VM: OpenJDK
> 64-Bit Server VM by JetBrains s.r.o. Linux 5.19.0-43-generic GC: G1
> Young Generation, G1 Old Generation Memory: 1994M Cores: 12 Registry:
>     undo.documentUndoLimit=1000
>     ide.smart.update=true
>     debugger.new.tool.window.layout=true
>     ide.experimental.ui=true
> 
> Non-Bundled Plugins:
>     com.intellij.ideolog (203.0.30.0)
>     net.sjrx.intellij.plugins.systemdunitfiles (223.230322.126)
>     IdeaVIM (2.3.0)
>     net.seesharpsoft.intellij.plugins.csv (3.2.0-231)
>     nl.jusx.pycharm.lineprofiler (1.7.0)
>     net.ashald.envfile (3.4.1)
>     com.koxudaxi.pydantic (0.4.2-231)
> 
> Current Desktop: KDE


I suspect this is related to the classmethod-property chaining, which was an added feature in Python 3.10, but which is being deprecated in Python 3.11 (and slated for removal in 3.13) since it broke a lot of outside tooling, and was generally half-baked. See this bug report for the feature being added, and this one for the feature being deprecated.
