comparison mercurial/templatefilters.py @ 52647:ab7b4fba8bde

pyupgrade: drop a few redundant types in `isinstance` lists This was rewritten by the `constant_fold` fixer in `pyupgrade`. I suspect that one of these `int`s were `long` in the py2 days, and some automated py2 -> py3 tool wasn't smart enough to elide these.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 06 Jan 2025 01:06:59 -0500
parents f4733654f144
children b3e68fd7864b
comparison
equal deleted inserted replaced
52646:cb769c0ffe35 52647:ab7b4fba8bde
330 return b'null' 330 return b'null'
331 elif obj is False: 331 elif obj is False:
332 return b'false' 332 return b'false'
333 elif obj is True: 333 elif obj is True:
334 return b'true' 334 return b'true'
335 elif isinstance(obj, (int, int, float)): 335 elif isinstance(obj, (int, float)):
336 return pycompat.bytestr(obj) 336 return pycompat.bytestr(obj)
337 elif isinstance(obj, bytes): 337 elif isinstance(obj, bytes):
338 return b'"%s"' % encoding.jsonescape(obj, paranoid=paranoid) 338 return b'"%s"' % encoding.jsonescape(obj, paranoid=paranoid)
339 elif isinstance(obj, type(u'')): 339 elif isinstance(obj, type(u'')):
340 raise error.ProgrammingError( 340 raise error.ProgrammingError(