changeset 43477:147576a4e6a2

posix: add a pytype suppression This one seems a little sketchier than the others, but this will clean up when we're Python 3-only. Differential Revision: https://phab.mercurial-scm.org/D7276
author Augie Fackler <augie@google.com>
date Wed, 06 Nov 2019 15:03:02 -0500
parents 949b4d545c90
children 54f4d094bab1
files mercurial/posix.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/posix.py	Wed Nov 06 14:48:22 2019 -0500
+++ b/mercurial/posix.py	Wed Nov 06 15:03:02 2019 -0500
@@ -323,7 +323,10 @@
                     fullpath = os.path.join(cachedir, target)
                     open(fullpath, b'w').close()
                 except IOError as inst:
-                    if inst[0] == errno.EACCES:
+                    if (
+                        inst[0]  # pytype: disable=unsupported-operands
+                        == errno.EACCES
+                    ):
                         # If we can't write to cachedir, just pretend
                         # that the fs is readonly and by association
                         # that the fs won't support symlinks. This