We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A hardcoded 4 space can look awkward - so adding an indentation property defaulting to 4 makes it possible to use another value in the call.
diff --git a/mdd.py b/mdd.py index cb9f3c1..cfb1de8 100644 --- a/mdd.py +++ b/mdd.py @@ -24,8 +24,8 @@ from dateutil import parser as date_parser inxi = None -def json_beaut(input, sort_keys=False): - return json.dumps(input, indent=4, sort_keys=sort_keys) +def json_beaut(input, sort_keys=False, indent=4): + return json.dumps(input, indent=indent, sort_keys=sort_keys) def prepare_inxi():
refactor-to-flexible-json-indent.txt
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A hardcoded 4 space can look awkward - so adding an indentation property defaulting to 4 makes it possible to use another value in the call.
refactor-to-flexible-json-indent.txt
The text was updated successfully, but these errors were encountered: