Things to check first
Typeguard version
4
Bug is not present with typeguard v2
Python version
3.7
What happened?
The code below raises:
obj.a = "2"
TypeError: a() takes 1 positional argument but 2 were given
How can we reproduce the bug?
from typeguard import typechecked
class MyClass:
def __init__(self) -> None:
self._a = "1"
@property
def a(self) -> str:
return self._a
@a.setter
@typechecked
def a(self, a: str) -> None:
self._a = a
obj = MyClass()
print(obj.a)
obj.a = "2"
print(obj.a)
Things to check first
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
Typeguard version
4
Bug is not present with typeguard v2
Python version
3.7
What happened?
The code below raises:
How can we reproduce the bug?