diff options
| author | Anthony Sottile <asottile@umich.edu> | 2020-05-12 05:21:11 +0000 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2020-05-12 05:21:11 +0000 |
| commit | 00985a64bce799583d438bb3893acfd8a08fde93 (patch) | |
| tree | f1e7b606906bb9bf4cacb1f65caad3621a7bcd08 /src | |
| parent | b4d285019210ccdb5d526e64c281db64e5316d6c (diff) | |
| parent | e6d8a90e5d6e9f3156a4adfcdb65a9fb1d12788f (diff) | |
| download | flake8-00985a64bce799583d438bb3893acfd8a08fde93.tar.gz | |
Merge branch 'issue638-ouput-file' into 'master'
options: Forward `--output-file` to be reparsed for BaseFormatter
Closes #637
See merge request pycqa/flake8!427
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/main/application.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/flake8/main/application.py b/src/flake8/main/application.py index 001ad6c..e4b7930 100644 --- a/src/flake8/main/application.py +++ b/src/flake8/main/application.py @@ -112,7 +112,12 @@ class Application(object): :rtype: (argparse.Namespace, list) """ - return self.prelim_arg_parser.parse_known_args(argv) + args, rest = self.prelim_arg_parser.parse_known_args(argv) + # XXX (ericvw): Special case "forwarding" the output file option so + # that it can be reparsed again for the BaseFormatter.filename. + if args.output_file: + rest.extend(("--output-file", args.output_file)) + return args, rest def exit(self): # type: () -> None |
