Hi, I am having an issue with mypy throwing an err...
# singer-tap-development
r
Hi, I am having an issue with mypy throwing an error
Signature of "authenticator" incompatible with supertype "RESTStream"
when using
@cached
from memoization on the authenticator method in a stream. The tap works otherwise but mypy does not like it. Has anyone run into this before? I don’t get a mypy error when
@cached
is not used. I am following the code sample here https://sdk.meltano.com/en/latest/code_samples.html#make-a-stream-reuse-the-same-authenticator-instance-for-all-requests
e
Hi Robby. What version of mypy are running on your tap?
r
mypy 1.1.1 I did find a temporary fix by changing
@cached
to
@cached  # type: ignore
e
Yup, and from experience it’s even better to specify the ignored error:
# type: ignore[override]