I have the following code:
def factory() -> Iterator[bytes]:
try:
while True: # noqa: WPS457
yield async_to_sync(async_anext)(iterator)
except StopAsyncIteration:
pass
It should not raise WPS457, because while is in try / except.
It can clearly raise and we handle the error. So, it is not infinite.
PRs are welcome! 👍
I have the following code:
It should not raise
WPS457, becausewhileis intry/except.It can clearly raise and we handle the error. So, it is not infinite.
PRs are welcome! 👍