-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Allow setting indent width or character in json.tool #426
New issue
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
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA. This is necessary for legal reasons before we can look at your contribution. Please follow these steps to help rectify the issue:
Thanks again to your contribution and we look forward to looking at it! |
@int-ua, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @tiran, @berkerpeksag, @ezio-melotti and @serhiy-storchaka to be potential reviewers. |
Sorry, looks like I've made a typo when searching before posting. |
Wait, #345 doesn't allow tabs. |
@int-ua see conversation here. Initially, I had implemented a solution that supported @serhiy-storchaka mentioned:
It doesn't look like your PR currently supports setting an |
It did allow integers, see line 38. Also, to prevent misunderstanding: I don't care at all whose commit is going to be merged, I really appreciate all Python authors' work and I just want tabs, a character created specifically to set indent level. Now, that's all, moving to BPO. |
options = parser.parse_args() | ||
|
||
infile = options.infile or sys.stdin | ||
outfile = options.outfile or sys.stdout | ||
sort_keys = options.sort_keys | ||
try: | ||
indent = int(options.indent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad... clearly supports int
!
Bumps [gidgethub](https://github.com/brettcannon/gidgethub) from 4.2.0 to 5.0.0. - [Release notes](https://github.com/brettcannon/gidgethub/releases) - [Changelog](https://github.com/brettcannon/gidgethub/blob/master/docs/changelog.rst) - [Commits](gidgethub/gidgethub@v4.2.0...5.0.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Allows having shorter or wider indentation or using tabs for it, like this: