Skip to content

Commit 76e9e67

Browse files
committed
Linting.
1 parent 7f23a8e commit 76e9e67

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

domdf_python_tools/versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def _prep_for_eq(other: Union[str, float, Version], ) -> Tuple[int, ...]:
244244
if isinstance(other, str):
245245
return tuple(_iter_string(other))
246246
elif isinstance(other, (Version, Sequence)):
247-
return tuple((int(x) for x in other))
247+
return tuple(int(x) for x in other)
248248
elif isinstance(other, (int, float)):
249249
return tuple(_iter_float(other))
250250
else: # pragma: no cover

tests/list_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ def test_extendedslicing(self):
599599

600600
def test_constructor_exception_handling(self):
601601
# Bug #1242657
602-
class F(object):
602+
class F:
603603

604604
def __iter__(self):
605605
raise KeyboardInterrupt

tests/seq_tests.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ def __hash__(self):
5959
# This is used for checking the constructor (here and in test_deque.py)
6060
def iterfunc(seqn):
6161
"""Regular generator"""
62-
for i in seqn:
63-
yield i
62+
yield from seqn
6463

6564

6665
class Sequence:
@@ -99,8 +98,7 @@ def __init__(self, seqn):
9998
self.i = 0
10099

101100
def __iter__(self):
102-
for val in self.seqn:
103-
yield val
101+
yield from self.seqn
104102

105103

106104
class IterNextOnly:

0 commit comments

Comments
 (0)