Skip to content
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

[BUG]: python -m json.tool: error: unrecognized arguments: --indent=4 #1870

Open
ppark-twosixtech opened this issue Jan 26, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ppark-twosixtech
Copy link
Contributor

Description of the bug

Executing a git commit leads to the following error for a pre-commit hook:

📄 Executing 'json.tool' formatter...
usage: python -m json.tool [-h] [--sort-keys] [--json-lines]
                           [infile] [outfile]
python -m json.tool: error: unrecognized arguments: --indent=4

--indent was introduced in Python 3.10, so this command will not work for lower Python versions (3.8.10 in my case). For awareness, the pre-commit hook change was introduced with PR #1708.

Recommend developers either remove --indent=4 from the command or update Python to 3.10 or higher.

Steps To Reproduce

Execute git commit to run pre-commit hook

Additional Information

No response

@ppark-twosixtech ppark-twosixtech added the bug Something isn't working label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants