##// END OF EJS Templates
profiling: add an assertion to help pytype...
profiling: add an assertion to help pytype Pytype 2023.11.21 with Python 3.10.11 (correctly) flagged `self._fp` as possibly not having a `getvalue()` method, likely since 6a8edf9f0a6d: File "/mnt/c/Users/Matt/hg/mercurial/profiling.py", line 344, in __exit__: No attribute 'getvalue' on BinaryIO [attribute-error] In Union[Any, BinaryIO, io.BytesIO] It appears this was flagged in CI too, but the test was marked as a success anyway, so it wasn't noticed. We'll fix that on stable and then merge on top of this.

File last commit:

r52757:1c5810ce default
r53297:5ff6fba7 default
Show More
__main__.py
15 lines | 252 B | text/x-python | PythonLexer
from __future__ import annotations
def run():
from . import demandimport
with demandimport.tracing.log('hg script'):
demandimport.enable()
from . import dispatch
dispatch.run()
if __name__ == '__main__':
run()