Mercurial > public > mercurial-scm > hg-stable
diff mercurial/formatter.py @ 52672: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 |
line wrap: on
line diff
--- a/mercurial/formatter.py Mon Jan 06 00:38:32 2025 -0500 +++ b/mercurial/formatter.py Mon Jan 06 01:06:59 2025 -0500 @@ -148,7 +148,7 @@ Returns False if the object is unsupported or must be pre-processed by formatdate(), formatdict(), or formatlist(). """ - return isinstance(obj, (type(None), bool, int, int, float, bytes)) + return isinstance(obj, (type(None), bool, int, float, bytes)) class _nullconverter: