diff options
author | Julian Berman <Julian@GrayVines.com> | 2020-03-21 16:56:13 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2020-03-21 16:56:13 -0400 |
commit | b156260a7a1084240937a79c3ebd093701b06b95 (patch) | |
tree | 20246ffac7d6e948899dbf0e8bbe045b072dac48 /jsonschema/cli.py | |
parent | 690e58376283fc8085c35b7baf05e33ec1c352d0 (diff) | |
download | jsonschema-b156260a7a1084240937a79c3ebd093701b06b95.tar.gz |
Only used in one place now.
Diffstat (limited to 'jsonschema/cli.py')
-rw-r--r-- | jsonschema/cli.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/jsonschema/cli.py b/jsonschema/cli.py index 71cec87..0f45fac 100644 --- a/jsonschema/cli.py +++ b/jsonschema/cli.py @@ -16,11 +16,6 @@ from jsonschema.exceptions import SchemaError, ValidationError from jsonschema.validators import validator_for -_PARSING_ERROR_MSG = ( - "Failed to parse {file_name}. Got the following error: {exception}\n" -) - - @attr.s class _PrettyOutputFormatter(object): @@ -49,10 +44,10 @@ class _PlainOutputFormatter(object): _error_format = attr.ib() def parsing_error(self, file_name, exception): - return _PARSING_ERROR_MSG.format( - file_name=file_name, - exception=exception, - ) + return ( + "Failed to parse {file_name}. " + "Got the following error: {exception}\n" + ).format(file_name=file_name, exception=exception) def validation_error(self, file_name, error_obj): return self._error_format.format(file_name=file_name, error=error_obj) |