Skip to content

Commit

Permalink
Merge 4eebe2e into fea03e0
Browse files Browse the repository at this point in the history
  • Loading branch information
carlio committed Nov 22, 2018
2 parents fea03e0 + 4eebe2e commit edcea4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion prospector/config/configuration.py
Expand Up @@ -164,7 +164,7 @@ def build_command_line_source(prog=None, description='Performs static analysis o
},
'output_format': {
'flags': ['-o', '--output-format'],
'help': 'The output format. Valid values are: %s' % (
'help': 'The output format. Valid values are: %s. This will output to stdout by default, however a target file can be used instead by adding :path-to-output-file, eg, -o json:output.json' % (
', '.join(sorted(FORMATTERS.keys())),
),
},
Expand Down
8 changes: 4 additions & 4 deletions prospector/config/datatype.py
@@ -1,11 +1,11 @@
from os import pathsep
import re

from setoptconf.datatype import Choice


class OutputChoice(Choice):
def sanitize(self, value):
splitted_value = value.split(pathsep)
output_format, output_targets = splitted_value[0], splitted_value[1:]
parsed = re.split(r'[;:]', value)
output_format, output_targets = parsed[0], parsed[1:]
validated_format = super(OutputChoice, self).sanitize(output_format)
return (output_format, output_targets)
return (output_format, output_targets)

0 comments on commit edcea4e

Please sign in to comment.