Skip to content

Commit f41303b

Browse files
committed
simplify method name check
1 parent f06681e commit f41303b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libmodernize/fixes/fix_dict_six.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ def transform_iter(self, node, results):
2424
syms = self.syms
2525
method_name = method.value
2626
name = fixer_util.Name(u'six.' + method_name, prefix=node.prefix)
27-
isiter = method_name.startswith(u'iter')
28-
isview = method_name.startswith(u'view')
29-
assert isiter or isview, repr(method)
27+
assert method_name.startswith((u'iter', u'view')), repr(method)
3028
assert method_name[4:] in (u'keys', u'items', u'values'), repr(method)
3129
head = [n.clone() for n in head]
3230
tail = [n.clone() for n in tail]

0 commit comments

Comments
 (0)