Patchwork D7677: typing: suppress a warning that mercurial.windows.checkosfilename is missing

login
register
mail settings
Submitter phabricator
Date Dec. 16, 2019, 6:32 a.m.
Message ID <8def6b34d2d79f1512a501c27571515c@localhost.localdomain>
Download mbox | patch
Permalink /patch/43863/
State Not Applicable
Headers show

Comments

phabricator - Dec. 16, 2019, 6:32 a.m.
Closed by commit rHG09bcbeacedc7: typing: suppress a warning that mercurial.windows.checkosfilename is missing (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7677?vs=18741&id=18752

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7677/new/

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

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -2050,7 +2050,8 @@ 
     checkosfilename = checkwinfilename
     timer = time.clock
 else:
-    checkosfilename = platform.checkosfilename
+    # mercurial.windows doesn't have platform.checkosfilename
+    checkosfilename = platform.checkosfilename  # pytype: disable=module-attr
     timer = time.time
 
 if safehasattr(time, "perf_counter"):