Skip to content

Commit fad0d58

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 fad0d58

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[tox]
2-
envlist = py{27,34,35,36}, lint, restlint
2+
envlist = py{27,35,36,37,38}, lint, restlint
33

44
[travis]
55
python =
66
2.7: py27
7-
3.4: py34
87
3.5: py35
98
3.6: py36, lint, restlint
109
3.7: py37, lint, restlint
10+
3.8: py38, lint, restlint
1111

1212
[testenv]
1313
usedevelop = True

0 commit comments

Comments
 (0)