D10165: typing: fix a suppression directive that was mangled by black formatting

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Fri Mar 12 18:08:28 UTC 2021


mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  It looks like black is moving comments needed by pytype out of position, and
  causing some things that should be disabled to be enforced anyway.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  mercurial/posix.py

CHANGE DETAILS

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



To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list