[X] I have searched the existing issues and didn't find my bug already reported there
[X] I have checked that my bug is still present in the latest release
Typeguard version
4.4.0
Python version
3.13.0
What happened?
Typeguard says that
typeguard.TypeCheckError: argument "arg" (class code.Class) is not compatible with the Proto protocol because its 'method' method should be an instance method but it's a static method
I think it is wrong saying that.
How can we reproduce the bug?
bug.py
from typeguard import install_import_hook
install_import_hook()
from code import Class, function
function(Class)
code.py
from typing import Protocol
class Proto(Protocol):
def method(self): ...
class Class(Proto):
def method(self): ...
def function(arg: type[Proto]): ...
Things to check first
[X] I have searched the existing issues and didn't find my bug already reported there
[X] I have checked that my bug is still present in the latest release
Typeguard version
4.4.0
Python version
3.13.0
What happened?
Typeguard says that
I think it is wrong saying that.
How can we reproduce the bug?
bug.py
code.py
Then run
python bug.py
.