debug: `isinstance(a, x) or isinstance(a, y)` is `isinstance(a, (x, y))`
authorAnton Shestakov <av6@dwimlabs.net>
Wed, 31 May 2023 12:02:56 -0300
changeset 50549 9dcb00842769
parent 50548 720a23405fe9
child 50550 9e24f8442640
debug: `isinstance(a, x) or isinstance(a, y)` is `isinstance(a, (x, y))`
mercurial/debugcommands.py
--- 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"):