Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 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 | 68af0228fedc |
comparison
equal
deleted
inserted
replaced
43882:a21a6dad4b38 | 43883:09bcbeacedc7 |
---|---|
2048 | 2048 |
2049 if pycompat.iswindows: | 2049 if pycompat.iswindows: |
2050 checkosfilename = checkwinfilename | 2050 checkosfilename = checkwinfilename |
2051 timer = time.clock | 2051 timer = time.clock |
2052 else: | 2052 else: |
2053 checkosfilename = platform.checkosfilename | 2053 # mercurial.windows doesn't have platform.checkosfilename |
2054 checkosfilename = platform.checkosfilename # pytype: disable=module-attr | |
2054 timer = time.time | 2055 timer = time.time |
2055 | 2056 |
2056 if safehasattr(time, "perf_counter"): | 2057 if safehasattr(time, "perf_counter"): |
2057 timer = time.perf_counter | 2058 timer = time.perf_counter |
2058 | 2059 |