changeset 43491:9391784299e9

cmdutil: suppress bogus pytype errors pytype seems to handle our subclass of tuple (scmutil.status) especially poorly. We should probably file a bug. Differential Revision: https://phab.mercurial-scm.org/D7294
author Augie Fackler <augie@google.com>
date Wed, 06 Nov 2019 17:35:24 -0500
parents 5b5e62c24b2e
children bad4a26b4607
files mercurial/cmdutil.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Wed Nov 06 17:25:43 2019 -0500
+++ b/mercurial/cmdutil.py	Wed Nov 06 17:35:24 2019 -0500
@@ -347,7 +347,7 @@
                 ui, originalhunks, recordfn, operation
             )
     except crecordmod.fallbackerror as e:
-        ui.warn(b'%s\n' % e.message)
+        ui.warn(b'%s\n' % e.message)  # pytype: disable=attribute-error
         ui.warn(_(b'falling back to text mode\n'))
 
     return patch.filterpatch(ui, originalhunks, match, operation)
@@ -435,7 +435,7 @@
                 copymod.copy(status[3]),
                 copymod.copy(status[4]),
                 copymod.copy(status[5]),
-                copymod.copy(status[6]),
+                copymod.copy(status[6]),  # pytype: disable=wrong-arg-count
             )
 
             # Force allows -X subrepo to skip the subrepo.
@@ -1289,7 +1289,7 @@
             if isinstance(r, revlog.revlog):
                 pass
             elif util.safehasattr(r, b'_revlog'):
-                r = r._revlog
+                r = r._revlog  # pytype: disable=attribute-error
             elif r is not None:
                 raise error.Abort(_(b'%r does not appear to be a revlog') % r)