Mercurial > hg
comparison mercurial/hgweb/hgweb_mod.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 | fda5a4b853ab |
comparison
equal
deleted
inserted
replaced
48945:55d132525155 | 48946:642e31cb55f0 |
---|---|
108 breadcrumb.append({b'url': urlel, b'name': pathel}) | 108 breadcrumb.append({b'url': urlel, b'name': pathel}) |
109 urlel = os.path.dirname(urlel) | 109 urlel = os.path.dirname(urlel) |
110 return templateutil.mappinglist(reversed(breadcrumb)) | 110 return templateutil.mappinglist(reversed(breadcrumb)) |
111 | 111 |
112 | 112 |
113 class requestcontext(object): | 113 class requestcontext: |
114 """Holds state/context for an individual request. | 114 """Holds state/context for an individual request. |
115 | 115 |
116 Servers can be multi-threaded. Holding state on the WSGI application | 116 Servers can be multi-threaded. Holding state on the WSGI application |
117 is prone to race conditions. Instances of this class exist to hold | 117 is prone to race conditions. Instances of this class exist to hold |
118 mutable and race-free state for requests. | 118 mutable and race-free state for requests. |
233 kwargs = pycompat.byteskwargs(kwargs) | 233 kwargs = pycompat.byteskwargs(kwargs) |
234 self.res.setbodygen(self.tmpl.generate(name, kwargs)) | 234 self.res.setbodygen(self.tmpl.generate(name, kwargs)) |
235 return self.res.sendresponse() | 235 return self.res.sendresponse() |
236 | 236 |
237 | 237 |
238 class hgweb(object): | 238 class hgweb: |
239 """HTTP server for individual repositories. | 239 """HTTP server for individual repositories. |
240 | 240 |
241 Instances of this class serve HTTP responses for a particular | 241 Instances of this class serve HTTP responses for a particular |
242 repository. | 242 repository. |
243 | 243 |