##// END OF EJS Templates
commands: necessary annotations and assertions to pass pytype...
Matt Harbison -
r47565:b26f9560 default
parent child Browse files
Show More
@@ -76,6 +76,12 b' from .utils import ('
76 stringutil,
76 stringutil,
77 )
77 )
78
78
79 if pycompat.TYPE_CHECKING:
80 from typing import (
81 List,
82 )
83
84
79 table = {}
85 table = {}
80 table.update(debugcommandsmod.command._table)
86 table.update(debugcommandsmod.command._table)
81
87
@@ -3295,7 +3301,8 b' def _dograft(ui, repo, *revs, **opts):'
3295 )
3301 )
3296 # checking that newnodes exist because old state files won't have it
3302 # checking that newnodes exist because old state files won't have it
3297 elif statedata.get(b'newnodes') is not None:
3303 elif statedata.get(b'newnodes') is not None:
3298 statedata[b'newnodes'].append(node)
3304 nn = statedata[b'newnodes'] # type: List[bytes]
3305 nn.append(node)
3299
3306
3300 # remove state when we complete successfully
3307 # remove state when we complete successfully
3301 if not opts.get(b'dry_run'):
3308 if not opts.get(b'dry_run'):
@@ -7268,6 +7275,12 b' def summary(ui, repo, **opts):'
7268 dest = dbranch = dother = outgoing = None
7275 dest = dbranch = dother = outgoing = None
7269
7276
7270 if opts.get(b'remote'):
7277 if opts.get(b'remote'):
7278 # Help pytype. --remote sets both `needsincoming` and `needsoutgoing`.
7279 # The former always sets `sother` (or raises an exception if it can't);
7280 # the latter always sets `outgoing`.
7281 assert sother is not None
7282 assert outgoing is not None
7283
7271 t = []
7284 t = []
7272 if incoming:
7285 if incoming:
7273 t.append(_(b'1 or more incoming'))
7286 t.append(_(b'1 or more incoming'))
General Comments 0
You need to be logged in to leave comments. Login now