Skip to content

Commit

Permalink
Fix pylint complaint, #2612
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Aug 26, 2022
1 parent b383c6f commit 304e209
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion peewee.py
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,7 @@ def __getitem__(self, item):
'end-point.')
return self.between(item.start, item.stop)
return self == item
def __iter__(self): raise NotImplementedError # Prevent accidents.
__iter__ = None # Prevent infinite loop.

def distinct(self):
return NodeList((SQL('DISTINCT'), self))
Expand Down
2 changes: 1 addition & 1 deletion tests/regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1740,4 +1740,4 @@ def assertNames(q, expected):

class TestFunctionInfiniteLoop(BaseTestCase):
def test_function_infinite_loop(self):
self.assertRaises(NotImplementedError, lambda: list(fn.COUNT()))
self.assertRaises(TypeError, lambda: list(fn.COUNT()))

0 comments on commit 304e209

Please sign in to comment.