Skip to content

Commit 92e90ba

Browse files
author
John Nonweiler
committed
Use list == operator
1 parent 4084c73 commit 92e90ba

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

scripts/filter_expected_warnings.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@
55
import re
66

77

8-
def compare_lists(list1, list2):
9-
"""Simple comparison of two lists."""
10-
if len(list1) != len(list2):
11-
return False
12-
for (elt1, elt2) in zip(list1, list2):
13-
if elt1 != elt2:
14-
return False
15-
return True
16-
17-
188
class DoxygenWarning(object):
199
"""Doxygen warning class."""
2010

@@ -30,7 +20,7 @@ def approx_equals(self, other):
3020
return False
3121
if self.warning != other.warning:
3222
return False
33-
return compare_lists(self.otherlines, other.otherlines)
23+
return self.otherlines == other.otherlines
3424

3525
def is_unexpected(self, expected_warnings):
3626
"""Return true unless this is in the list of expected warnings."""

0 commit comments

Comments
 (0)