##// END OF EJS Templates
typing: add type hints to `mercurial.dirstatemap`...
typing: add type hints to `mercurial.dirstatemap` Somewhere since 10db46e128d4, pytype stopped being able to infer the type of the `identity` field. Fill in some obvious other hints along the way. These hints caused pytype to flag a missing attribute: File "/mnt/c/Users/Matt/hg/mercurial/dirstatemap.py", line 714, in _v1_map: No attribute 'stat' on mercurial.windows.cachestat [attribute-error] In Union[Any, mercurial.posix.cachestat, mercurial.windows.cachestat] File "/mnt/c/Users/Matt/hg/mercurial/dirstatemap.py", line 715, in _v1_map: No attribute 'stat' on mercurial.windows.cachestat [attribute-error] In Union[Any, mercurial.posix.cachestat, mercurial.windows.cachestat] In practice, the `identity` field is NOT replaced with None if it isn't cacheable, so it's probably safer to just add the field and set it to None, since that check is already in place on line 715.
Matt Harbison -
r52609:f3b34386 default
Show More
Name Size Modified Last Commit Author
/ mercurial / cext
__init__.py Loading ...
base85.c Loading ...
base85.pyi Loading ...
bdiff.c Loading ...
bdiff.pyi Loading ...
charencode.c Loading ...
charencode.h Loading ...
dirs.c Loading ...
manifest.c Loading ...
mpatch.c Loading ...
mpatch.pyi Loading ...
osutil.c Loading ...
osutil.pyi Loading ...
parsers.c Loading ...
parsers.pyi Loading ...
pathencode.c Loading ...
py.typed Loading ...
revlog.c Loading ...
revlog.h Loading ...
util.h Loading ...