# HG changeset patch # User Matt Harbison # Date 2019-12-16 02:43:18 # Node ID 09bcbeacedc7b512c66a70069fca8be929dc3b01 # Parent a21a6dad4b38ac3d56b6286f70429bd11b7dc7c1 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 diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -2050,7 +2050,8 @@ if pycompat.iswindows: 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"):