Patchwork D7462: py3: make doc strings containing the deprected '\.' escape sequence raw strings

login
register
mail settings
Submitter phabricator
Date Nov. 21, 2019, 3:17 a.m.
Message ID <differential-rev-PHID-DREV-vtufz7hb7unnzorpppc3-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43376/
State Superseded
Headers show

Comments

phabricator - Nov. 21, 2019, 3:17 a.m.
dploch created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/match.py

CHANGE DETAILS




To: dploch, #hg-reviewers
Cc: mercurial-devel
phabricator - Nov. 21, 2019, 1:37 p.m.
pulkit added a comment.


  Applied the following diff to commit message as `test-check-commit.t` was complaining:
  
    --- a/changeset-description
    +++ b/changeset-description
    @@ -1,3 +1,3 @@
    -py3: make doc strings containing the deprected '\.' escape sequence raw strings
    +py3: make doc strings containing deprecated '\.' escape sequence raw strings

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7462/new/

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

To: dploch, #hg-reviewers, dlax, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -543,7 +543,7 @@ 
 
 
 class patternmatcher(basematcher):
-    """Matches a set of (kind, pat, source) against a 'root' directory.
+    r"""Matches a set of (kind, pat, source) against a 'root' directory.
 
     >>> kindpats = [
     ...     (b're', br'.*\.c$', b''),
@@ -1152,7 +1152,7 @@ 
 
 
 def patkind(pattern, default=None):
-    '''If pattern is 'kind:pat' with a known kind, return kind.
+    r'''If pattern is 'kind:pat' with a known kind, return kind.
 
     >>> patkind(br're:.*\.c$')
     're'