Patchwork D11469: typing: suppress an name-error warning in `mercurial/windows.py`

login
register
mail settings
Submitter phabricator
Date Sept. 21, 2021, 3:38 p.m.
Message ID <differential-rev-PHID-DREV-m4svvnzbkrxpzwqbny2y-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49785/
State Superseded
Headers show

Comments

phabricator - Sept. 21, 2021, 3:38 p.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Newly caught by pytype 2021-09-09.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/windows.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/windows.py b/mercurial/windows.py
--- a/mercurial/windows.py
+++ b/mercurial/windows.py
@@ -175,7 +175,7 @@ 
             return mixedfilemodewrapper(fp)
 
         return fp
-    except WindowsError as err:
+    except WindowsError as err:  # pytype: disable=name-error
         # convert to a friendlier exception
         raise IOError(
             err.errno, '%s: %s' % (encoding.strfromlocal(name), err.strerror)