jayvdb / sre-tools

Unnecessary generator PTC-W0015
Anti-pattern
Major
2 years ago2 years old
Unnecessary generator - rewrite as a list comprehension
119    if length != len(b):
120        return False
121
122    types_a = list(type(i) for i in a)123    types_b = list(type(i) for i in b)
124    if types_a != types_b:
125        if types_a[:-1] == types_b[:-1]:
Unnecessary generator - rewrite as a list comprehension
120        return False
121
122    types_a = list(type(i) for i in a)
123    types_b = list(type(i) for i in b)124    if types_a != types_b:
125        if types_a[:-1] == types_b[:-1]:
126            return _val_eq(a[-1], b[-1])