Patchwork D6202: setup: use raw string for regular expression

login
register
mail settings
Submitter phabricator
Date April 5, 2019, 1:21 a.m.
Message ID <differential-rev-PHID-DREV-svp56zakzdyhd2cvstls-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39489/
State Superseded
Headers show

Comments

phabricator - April 5, 2019, 1:21 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Otherwise Python 3.8 complains about the backslash.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6202

AFFECTED FILES
  setup.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -796,7 +796,7 @@ 
 
         # This logic is duplicated in doc/Makefile.
         sources = {f for f in os.listdir('mercurial/help')
-                   if re.search('[0-9]\.txt$', f)}
+                   if re.search(r'[0-9]\.txt$', f)}
 
         # common.txt is a one-off.
         gentxt('common')