D5817: attr: make some docstrings raw strings
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Mon Feb 4 17:19:34 UTC 2019
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
This avoids a SyntaxWarning in Python 3.8 due to invalid
\ escapes.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5817
AFFECTED FILES
mercurial/thirdparty/attr/_make.py
mercurial/thirdparty/attr/filters.py
CHANGE DETAILS
diff --git a/mercurial/thirdparty/attr/filters.py b/mercurial/thirdparty/attr/filters.py
--- a/mercurial/thirdparty/attr/filters.py
+++ b/mercurial/thirdparty/attr/filters.py
@@ -19,7 +19,7 @@
def include(*what):
- """
+ r"""
Whitelist *what*.
:param what: What to whitelist.
@@ -36,7 +36,7 @@
def exclude(*what):
- """
+ r"""
Blacklist *what*.
:param what: What to blacklist.
diff --git a/mercurial/thirdparty/attr/_make.py b/mercurial/thirdparty/attr/_make.py
--- a/mercurial/thirdparty/attr/_make.py
+++ b/mercurial/thirdparty/attr/_make.py
@@ -56,7 +56,7 @@
def attr(default=NOTHING, validator=None,
repr=True, cmp=True, hash=None, init=True,
convert=None, metadata={}):
- """
+ r"""
Create a new attribute on a class.
.. warning::
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list