Mercurial > hg
annotate mercurial/__main__.py @ 51715:7601978f9e9f
typing: add type hints to `cmdutil.findrepo()`
Since 10db46e128d4, pytype almost figured this out, going from `Any` -> `_T0`,
but the intent is obvious.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 18 Jul 2024 19:55:51 -0400 |
parents | e7ef11b75fdc |
children | 1c5810ce737e |
rev | line source |
---|---|
50697
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
1 def run(): |
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
2 from . import demandimport |
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
3 |
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
4 with demandimport.tracing.log('hg script'): |
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
5 demandimport.enable() |
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
6 from . import dispatch |
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
7 |
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
8 dispatch.run() |
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
9 |
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
10 |
50696
eb01d3a65ad8
library: enable runpy invocation on mercurial package
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff
changeset
|
11 if __name__ == '__main__': |
50697
e7ef11b75fdc
library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents:
50696
diff
changeset
|
12 run() |