comparison mercurial/keepalive.py @ 51862:607e94e01851

format: add many "missing" comma Black was not adding them until the next changeset introduced a bunch of `from __future__ import annotations` to most file. Since it make the next changeset hard to read we introduce them in advance.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 16 Sep 2024 15:36:38 +0200
parents 454feddab720
children f4733654f144
comparison
equal deleted inserted replaced
51861:f81e0ce5103a 51862:607e94e01851
337 if urllibcompat.hasdata(req): 337 if urllibcompat.hasdata(req):
338 data = urllibcompat.getdata(req) 338 data = urllibcompat.getdata(req)
339 h.putrequest( 339 h.putrequest(
340 req.get_method(), 340 req.get_method(),
341 urllibcompat.getselector(req), 341 urllibcompat.getselector(req),
342 **skipheaders 342 **skipheaders,
343 ) 343 )
344 if 'content-type' not in headers: 344 if 'content-type' not in headers:
345 h.putheader( 345 h.putheader(
346 'Content-type', 'application/x-www-form-urlencoded' 346 'Content-type', 'application/x-www-form-urlencoded'
347 ) 347 )
349 h.putheader('Content-length', '%d' % len(data)) 349 h.putheader('Content-length', '%d' % len(data))
350 else: 350 else:
351 h.putrequest( 351 h.putrequest(
352 req.get_method(), 352 req.get_method(),
353 urllibcompat.getselector(req), 353 urllibcompat.getselector(req),
354 **skipheaders 354 **skipheaders,
355 ) 355 )
356 except socket.error as err: 356 except socket.error as err:
357 raise urlerr.urlerror(err) 357 raise urlerr.urlerror(err)
358 for k, v in headers.items(): 358 for k, v in headers.items():
359 h.putheader(k, v) 359 h.putheader(k, v)