remove redundant json-calls

pull/245/head
Roman v. Gemmeren 5 years ago
parent 09ec4d3ee7
commit 2c52058530
No known key found for this signature in database
GPG Key ID: 630038BE768F4344

@ -87,13 +87,13 @@ class Format(object):
@staticmethod
def json(problem, filename):
return json.dumps({
return {
"path": filename,
"line": problem.line,
"char": problem.column,
"description": problem.message,
"severity": problem.level,
})
}
def show_problems(problems, file, args_format, no_warn):
max_level = 0
@ -107,7 +107,7 @@ def show_problems(problems, file, args_format, no_warn):
if args_format == 'parsable':
print(Format.parsable(problem, file))
elif args_format == 'json':
problems_json.append(json.loads(Format.json(problem, file)))
problems_json.append(Format.json(problem, file))
elif args_format == 'colored' or \
(args_format == 'auto' and supports_color()):
if first:

Loading…
Cancel
Save