From 6d90fa2300b463f5cc6920022a445d5ed217124c Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 20 May 2023 22:15:05 +1000 Subject: `qmk format-json`: Expose full key path and respect `sort_keys` (#20836) --- lib/python/qmk/cli/c2json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python/qmk/cli/c2json.py') diff --git a/lib/python/qmk/cli/c2json.py b/lib/python/qmk/cli/c2json.py index 43110a9387..7f6aca070a 100644 --- a/lib/python/qmk/cli/c2json.py +++ b/lib/python/qmk/cli/c2json.py @@ -57,7 +57,7 @@ def c2json(cli): cli.args.output.parent.mkdir(parents=True, exist_ok=True) if cli.args.output.exists(): cli.args.output.replace(cli.args.output.parent / (cli.args.output.name + '.bak')) - cli.args.output.write_text(json.dumps(keymap_json, cls=InfoJSONEncoder)) + cli.args.output.write_text(json.dumps(keymap_json, cls=InfoJSONEncoder, sort_keys=True)) if not cli.args.quiet: cli.log.info('Wrote keymap to %s.', cli.args.output) -- cgit v1.2.3