Skip to content

Commit e311701

Browse files
committed
Repair various invalid escape sequences
Python 3.8 warns about invalid escape sequences. Replace occurrences with valid equivalents. Signed-off-by: Peter Grayson <[email protected]>
1 parent e49fd5f commit e311701

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

stgit/commands/id.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
help = 'Print the git hash value of a StGit reference'
2626
kind = 'repo'
2727
usage = ['[options] [--] [<id>]']
28-
description = """
28+
description = r"""
2929
Print the SHA1 value of a Git id (defaulting to HEAD). In addition to the
3030
standard Git id's like heads and tags, this command also accepts
3131
'[<branch>:]<patch>' for the id of a patch, '[<branch>:]\{base\}' for the base

stgit/commands/mail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def __get_signers_list(msg):
412412
for line in msg.split('\n'):
413413
m = r.match(line)
414414
if m:
415-
addr_list.append(m.expand('\g<2>'))
415+
addr_list.append(m.expand(r'\g<2>'))
416416

417417
return addr_list
418418

stgit/completion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def util():
6464
fun('_stg_branches',
6565
'local g=$(_gitdir)', 'test "$g" && (cd $g/patches/ && echo *)'),
6666
fun('_mail_aliases',
67-
'git config --name-only --get-regexp "^mail\.alias\." | cut -d. -f 3'),
67+
'git config --name-only --get-regexp "^mail\\.alias\\." | cut -d. -f 3'),
6868
ref_list_fun('_all_branches', 'refs/heads'),
6969
ref_list_fun('_tags', 'refs/tags'),
7070
ref_list_fun('_remotes', 'refs/remotes')]

0 commit comments

Comments
 (0)