[PATCH 5 of 8] py3: fix type of attribute names forwarded by templatekw._hybrid

Yuya Nishihara yuya at tcha.org
Thu Mar 1 09:17:12 EST 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1519910387 18000
#      Thu Mar 01 08:19:47 2018 -0500
# Node ID 89d47c8b3dc9a4dcc207319b8177440fd5d99d2b
# Parent  63188d7c6282a68518421ef7f60c85b312ffec3b
py3: fix type of attribute names forwarded by templatekw._hybrid

# skip-blame because just r'' prefixes

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -64,8 +64,8 @@ class _hybrid(object):
     def __iter__(self):
         return iter(self._values)
     def __getattr__(self, name):
-        if name not in ('get', 'items', 'iteritems', 'iterkeys', 'itervalues',
-                        'keys', 'values'):
+        if name not in (r'get', r'items', r'iteritems', r'iterkeys',
+                        r'itervalues', r'keys', r'values'):
             raise AttributeError(name)
         return getattr(self._values, name)
 


More information about the Mercurial-devel mailing list