changeset 50549:9dcb00842769

debug: `isinstance(a, x) or isinstance(a, y)` is `isinstance(a, (x, y))`
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 31 May 2023 12:02:56 -0300
parents 720a23405fe9
children 9e24f8442640
files mercurial/debugcommands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Wed May 31 12:01:25 2023 -0300
+++ b/mercurial/debugcommands.py	Wed May 31 12:02:56 2023 -0300
@@ -2642,7 +2642,7 @@
     r = cmdutil.openstorage(
         repo.unfiltered(), b'debugnodemap', file_, pycompat.byteskwargs(opts)
     )
-    if isinstance(r, manifest.manifestrevlog) or isinstance(r, filelog.filelog):
+    if isinstance(r, (manifest.manifestrevlog, filelog.filelog)):
         r = r._revlog
     if opts['dump_new']:
         if util.safehasattr(r.index, "nodemap_data_all"):