Patchwork D10870: typing: disable warnings for a couple of Windows specific attributes

login
register
mail settings
Submitter phabricator
Date June 12, 2021, 3:45 a.m.
Message ID <differential-rev-PHID-DREV-7mud5zy5r47ym6tdrhjh-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49191/
State Superseded
Headers show

Comments

phabricator - June 12, 2021, 3:45 a.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

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
@@ -202,7 +202,7 @@ 
     """
     pw = ""
     while True:
-        c = msvcrt.getwch()
+        c = msvcrt.getwch()  # pytype: disable=module-attr
         if c == '\r' or c == '\n':
             break
         if c == '\003':
@@ -211,8 +211,8 @@ 
             pw = pw[:-1]
         else:
             pw = pw + c
-    msvcrt.putwch('\r')
-    msvcrt.putwch('\n')
+    msvcrt.putwch('\r')  # pytype: disable=module-attr
+    msvcrt.putwch('\n')  # pytype: disable=module-attr
     return encoding.strtolocal(pw)