comparison mercurial/scmutil.py @ 52653:b3e68fd7864b

pyupgrade: primitive types directly where possible This was rewritten by the `type_of_primitive` fixer in `pyupgrade`. Interesting that 9db77d46de79 missed a bunch of these `u''` prefixes.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 06 Jan 2025 01:39:53 -0500
parents f066fc0bdc7a
children b7afc38468bd
comparison
equal deleted inserted replaced
52652:0e713555ecdc 52653:b3e68fd7864b
212 if inst.hint: 212 if inst.hint:
213 ui.error(_(b"(%s)\n") % inst.hint) 213 ui.error(_(b"(%s)\n") % inst.hint)
214 except error.ResponseError as inst: 214 except error.ResponseError as inst:
215 ui.error(_(b"abort: %s") % inst.args[0]) 215 ui.error(_(b"abort: %s") % inst.args[0])
216 msg = inst.args[1] 216 msg = inst.args[1]
217 if isinstance(msg, type(u'')): 217 if isinstance(msg, str):
218 msg = pycompat.sysbytes(msg) 218 msg = pycompat.sysbytes(msg)
219 if msg is None: 219 if msg is None:
220 ui.error(b"\n") 220 ui.error(b"\n")
221 elif not isinstance(msg, bytes): 221 elif not isinstance(msg, bytes):
222 ui.error(b" %r\n" % (msg,)) 222 ui.error(b" %r\n" % (msg,))