@@ -209,7 +209,7 @@ def extract_build_opt(name: str, dst: TextIO, src: TextIO):
209
209
IN_SKIP_OPT = 3
210
210
211
211
state = IN_RAW
212
- block = [] # type: List[str ]
212
+ block : List [ str ] = [ ]
213
213
214
214
for n , raw_line in enumerate (src , start = 1 ):
215
215
line = raw_line .strip ().rstrip ()
@@ -538,9 +538,7 @@ def main_build(args: argparse.Namespace):
538
538
return
539
539
540
540
# when debug port is used, allow for a different set of command line options
541
- build_debug = args .build_debug or "DEBUG_SERIAL_PORT" in (
542
- args .D or []
543
- ) # type: bool
541
+ build_debug : bool = args .build_debug or "DEBUG_SERIAL_PORT" in (args .D or [])
544
542
name = make_build_opt_name (ctx , build_debug )
545
543
546
544
# options file is not written immediately, buffer its contents before commiting
@@ -578,7 +576,7 @@ def main_build(args: argparse.Namespace):
578
576
579
577
580
578
def main_inspect (args : argparse .Namespace ):
581
- p = args .path # type: pathlib.Path
579
+ p : pathlib . Path = args .path
582
580
583
581
buffer = io .StringIO ()
584
582
try :
@@ -590,13 +588,13 @@ def main_inspect(args: argparse.Namespace):
590
588
591
589
592
590
def main_placeholder (args : argparse .Namespace ):
593
- paths = args . path # type : List[pathlib.Path]
591
+ paths : List [pathlib .Path ] = args . path
594
592
ensure_exists_and_empty (* paths )
595
593
596
594
597
595
def main_synchronize (args : argparse .Namespace ):
598
- first = args .first # type: pathlib.Path
599
- rest = args . rest # type : List[pathlib.Path]
596
+ first : pathlib . Path = args .first
597
+ rest : List [pathlib .Path ] = args . rest
600
598
synchronize_utime (first , * rest )
601
599
602
600
0 commit comments