Skip to content

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

Merged
merged 9 commits into from
Oct 12, 2022
9 changes: 7 additions & 2 deletions pandas/tests/io/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -1280,9 +1280,14 @@ def seek(self, offset):
def seekable(self):
return True

# GH 49036 pylint checks for presence of __next__ for iterators
def __next__(self):
...

def __iter__(self) -> Iterator:
# to fool `is_file_like`, should never end up here
assert False
# `is_file_like` depends on the presence of
# the __iter__ attribute.
return self

good = MockFile("<table><tr><td>spam<br />eggs</td></tr></table>")
bad = MockFile("<table><tr><td>spam<foobr />eggs</td></tr></table>")
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ disable = [
"no-method-argument",
"no-name-in-module",
"no-value-for-parameter",
"non-iterator-returned",
"not-an-iterable",
"not-callable",
"redundant-keyword-arg",
Expand Down