comparison mercurial/formatter.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
comparison
equal deleted inserted replaced
52646:cb769c0ffe35 52647:ab7b4fba8bde
146 write() and data() functions 146 write() and data() functions
147 147
148 Returns False if the object is unsupported or must be pre-processed by 148 Returns False if the object is unsupported or must be pre-processed by
149 formatdate(), formatdict(), or formatlist(). 149 formatdate(), formatdict(), or formatlist().
150 """ 150 """
151 return isinstance(obj, (type(None), bool, int, int, float, bytes)) 151 return isinstance(obj, (type(None), bool, int, float, bytes))
152 152
153 153
154 class _nullconverter: 154 class _nullconverter:
155 '''convert non-primitive data types to be processed by formatter''' 155 '''convert non-primitive data types to be processed by formatter'''
156 156