Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/webcommands.py @ 52638:dc36535a5edc
style: drop extraneous parentheses
These were rewritten by `pyupgrade`.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 06 Jan 2025 14:07:43 -0500 |
parents | f4733654f144 |
children | e627cc25b6f3 |
comparison
equal
deleted
inserted
replaced
52637:3b6f25190157 | 52638:dc36535a5edc |
---|---|
1256 | 1256 |
1257 if type_ not in webutil.archivespecs: | 1257 if type_ not in webutil.archivespecs: |
1258 msg = b'Unsupported archive type: %s' % stringutil.pprint(type_) | 1258 msg = b'Unsupported archive type: %s' % stringutil.pprint(type_) |
1259 raise ErrorResponse(HTTP_NOT_FOUND, msg) | 1259 raise ErrorResponse(HTTP_NOT_FOUND, msg) |
1260 | 1260 |
1261 if not ((type_ in allowed or web.configbool(b"web", b"allow" + type_))): | 1261 if not (type_ in allowed or web.configbool(b"web", b"allow" + type_)): |
1262 msg = b'Archive type not allowed: %s' % type_ | 1262 msg = b'Archive type not allowed: %s' % type_ |
1263 raise ErrorResponse(HTTP_FORBIDDEN, msg) | 1263 raise ErrorResponse(HTTP_FORBIDDEN, msg) |
1264 | 1264 |
1265 reponame = re.sub(br"\W+", b"-", os.path.basename(web.reponame)) | 1265 reponame = re.sub(br"\W+", b"-", os.path.basename(web.reponame)) |
1266 cnode = web.repo.lookup(key) | 1266 cnode = web.repo.lookup(key) |