changeset 43883:09bcbeacedc7

typing: suppress a warning that mercurial.windows.checkosfilename is missing This function is used to check filename portability everwhere, so it isn't tucked into the windows.py module. I supposed the alternative is to move it and then alias it in `util`. I'm guessing it was done like this to save an import. Differential Revision: https://phab.mercurial-scm.org/D7677
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 15 Dec 2019 21:43:18 -0500
parents a21a6dad4b38
children 5709a9992c2a
files mercurial/util.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Sun Dec 15 21:36:06 2019 -0500
+++ b/mercurial/util.py	Sun Dec 15 21:43:18 2019 -0500
@@ -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"):