-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
STYLE: Fix or suppress non-iterator-returned errors from pylint #49036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STYLE: Fix or suppress non-iterator-returned errors from pylint #49036
Conversation
pandas/tests/io/test_html.py
Outdated
@@ -1280,6 +1280,8 @@ def seek(self, offset): | |||
def seekable(self): | |||
return True | |||
|
|||
# GH 48855 suppressing false positives | |||
# pylint: disable-next=non-iterator-returned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be corrected such that the check and existing test passes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll give that a shot this evening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reviewing #17975 ( issue prompting this test), I added __next__
and changed __iter__
to remove the warning from pylint while letting existing test pass.
…/pandas into check_non_iterator_returned
Thanks @roadswitcher |
…as-dev#49036) * Working on finding issues with non-iterator-returned * Found one instance to suppress * Misread the error message, suppressed wrong line. * Change test so that pylint treats it as iterator * Fix formatting. * Added reference to PR in comment.
non-iterator-returned
) from STYLE fix pylint issues #48855Found one instance of a test that's deliberately returning an Iterator to fool
is_file_like
, suppressing the warning as a false positive based on nature of test.