@@ -226,7 +226,8 @@ def process_options(args: List[str],
226
226
# TODO: `mypy -c A -c B` and `mypy -p A -p B` currently silently
227
227
# ignore A (last option wins). Perhaps -c, -m and -p could just
228
228
# be command-line flags that modify how we interpret self.files?
229
- code_group .add_argument ('-c' , '--command' , metavar = 'PROGRAM_TEXT' , dest = 'special-opts:command' ,
229
+ code_group .add_argument ('-c' , '--command' , action = 'append' , metavar = 'PROGRAM_TEXT' ,
230
+ dest = 'special-opts:command' ,
230
231
help = "type-check program passed in as string" )
231
232
code_group .add_argument ('-p' , '--package' , metavar = 'PACKAGE' , dest = 'special-opts:package' ,
232
233
help = "type-check all files in a directory" )
@@ -294,7 +295,7 @@ def process_options(args: List[str],
294
295
return targets , options
295
296
elif special_opts .command :
296
297
options .build_type = BuildType .PROGRAM_TEXT
297
- return [BuildSource (None , None , special_opts .command )], options
298
+ return [BuildSource (None , None , ' \n ' . join ( special_opts .command ) )], options
298
299
else :
299
300
targets = []
300
301
for f in special_opts .files :
0 commit comments