You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new .py file with the following contents:
defpaused_iter(iterable):
"""Iterate an iterable, yielding the previous item using `i.send(True)`."""iterator=iter(iterable)
whileTrue:
try:
value=next(iterator)
exceptStopIteration:
return# Continue to yield the same item until `next(i)` or `i.send(False)`while (yieldvalue):
passITERATOR=paused_iter(range(3))
Run pylint on this file.
Current behavior
Pylint reports the following error:
/path/to/file.py:15:0: E1128: Assigning result of a function call, where the function returns None (assignment-from-none)
Expected behavior
The above error does not apply to the above valid code since the function that "returns None" is a generator. Thus, I expect that no such error should be reported.
Steps to reproduce
pylint
on this file.Current behavior
Pylint reports the following error:
Expected behavior
The above error does not apply to the above valid code since the function that "returns None" is a generator. Thus, I expect that no such error should be reported.
pylint --version output
The text was updated successfully, but these errors were encountered: