From patchwork Tue Sep 21 15:38:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D11469: typing: suppress an name-error warning in `mercurial/windows.py` From: phabricator X-Patchwork-Id: 49785 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 21 Sep 2021 15:38:39 +0000 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 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)