comparison mercurial/namespaces.py @ 48946: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 f4733654f144
comparison
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
14 return [] 14 return []
15 else: 15 else:
16 return [val] 16 return [val]
17 17
18 18
19 class namespaces(object): 19 class namespaces:
20 """provides an interface to register and operate on multiple namespaces. See 20 """provides an interface to register and operate on multiple namespaces. See
21 the namespace class below for details on the namespace object. 21 the namespace class below for details on the namespace object.
22 22
23 """ 23 """
24 24
122 if n: 122 if n:
123 return n 123 return n
124 raise KeyError(_(b'no such name: %s') % name) 124 raise KeyError(_(b'no such name: %s') % name)
125 125
126 126
127 class namespace(object): 127 class namespace:
128 """provides an interface to a namespace 128 """provides an interface to a namespace
129 129
130 Namespaces are basically generic many-to-many mapping between some 130 Namespaces are basically generic many-to-many mapping between some
131 (namespaced) names and nodes. The goal here is to control the pollution of 131 (namespaced) names and nodes. The goal here is to control the pollution of
132 jamming things into tags or bookmarks (in extension-land) and to simplify 132 jamming things into tags or bookmarks (in extension-land) and to simplify