Skip to content

Commit e7a61dd

Browse files
committed
Add fixes from PR review
* Drop python 3.4 from tox.ini * Add Python 3.8 to tox.ini * Correct variable names * Change string to regex string
1 parent 71d9e92 commit e7a61dd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hashin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,13 @@ def is_different_lines(old_lines, new_lines, indent):
392392
# in the lines being compared. This results in "old" names matching
393393
# "new" names so that hashin correctly replaces them when it looks for
394394
# them.
395-
rex = re.compile("[-_]")
395+
match_delims = re.compile(r"[-_]")
396396

397397
# This assumes that the package is already mentioned in the old
398398
# requirements. Now we just need to double-check that its lines are
399399
# different.
400400
# The 'new_lines` is what we might intend to replace it with.
401-
old = set([rex.sub("-", l.strip(" \\")) for l in old_lines])
401+
old = set([match_delims.sub("-", line.strip(" \\")) for line in old_lines])
402402
new = set([indent + x.strip(" \\") for x in new_lines])
403403
return old != new
404404

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{27,34,35,36}, lint, restlint
2+
envlist = py{27,34,35,36,37}, lint, restlint
33

44
[travis]
55
python =

0 commit comments

Comments
 (0)