Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/templateutil.py @ 49037:642e31cb55f0
py3: use class X: instead of class X(object):
The inheritance from object is implied in Python 3. So this should
be equivalent.
This change was generated via an automated search and replace. So there
may have been some accidental changes.
Differential Revision: https://phab.mercurial-scm.org/D12352
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 13:08:28 -0700 |
parents | f254fc73d956 |
children | 82ef5410f2aa |
comparison
equal
deleted
inserted
replaced
49036:55d132525155 | 49037:642e31cb55f0 |
---|---|
29 | 29 |
30 class TemplateNotFound(error.Abort): | 30 class TemplateNotFound(error.Abort): |
31 pass | 31 pass |
32 | 32 |
33 | 33 |
34 class wrapped(object): # pytype: disable=ignored-metaclass | 34 class wrapped: # pytype: disable=ignored-metaclass |
35 """Object requiring extra conversion prior to displaying or processing | 35 """Object requiring extra conversion prior to displaying or processing |
36 as value | 36 as value |
37 | 37 |
38 Use unwrapvalue() or unwrapastype() to obtain the inner object. | 38 Use unwrapvalue() or unwrapastype() to obtain the inner object. |
39 """ | 39 """ |
106 | 106 |
107 A returned value must be serializable by templaterfilters.json(). | 107 A returned value must be serializable by templaterfilters.json(). |
108 """ | 108 """ |
109 | 109 |
110 | 110 |
111 class mappable(object): # pytype: disable=ignored-metaclass | 111 class mappable: # pytype: disable=ignored-metaclass |
112 """Object which can be converted to a single template mapping""" | 112 """Object which can be converted to a single template mapping""" |
113 | 113 |
114 __metaclass__ = abc.ABCMeta | 114 __metaclass__ = abc.ABCMeta |
115 | 115 |
116 def itermaps(self, context): | 116 def itermaps(self, context): |