Patchwork D7276: posix: add a pytype suppression

login
register
mail settings
Submitter phabricator
Date Nov. 6, 2019, 10:58 p.m.
Message ID <differential-rev-PHID-DREV-h4m6iitxj2audt5znfxj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42828/
State Superseded
Headers show

Comments

phabricator - Nov. 6, 2019, 10:58 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This one seems a little sketchier than the others, but this will clean
  up when we're Python 3-only.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7276

AFFECTED FILES
  mercurial/posix.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/posix.py b/mercurial/posix.py
--- a/mercurial/posix.py
+++ b/mercurial/posix.py
@@ -323,7 +323,9 @@ 
                     fullpath = os.path.join(cachedir, target)
                     open(fullpath, b'w').close()
                 except IOError as inst:
-                    if inst[0] == errno.EACCES:
+                    if (
+                        inst[0] == errno.EACCES
+                    ):  # pytype: disable=unsupported-operands
                         # 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