I have a tap that consumes from a stream and I wan...
# singer-tap-development
m
I have a tap that consumes from a stream and I want to force it to end (with success, not with failure) under a certain condition. What’s the correct way to do this? E.g. in my implementation of get_records can I just
raise StopIteration
or
return
?
1
seems that of those two options
return
is the preferred way to do this https://pylint.readthedocs.io/en/stable/user_guide/messages/refactor/stop-iteration-return.html
👍 1
added a
return
and that worked perfectly
e
Nice!