summaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/pyformat.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/qmk/cli/pyformat.py')
-rwxr-xr-xlib/python/qmk/cli/pyformat.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/python/qmk/cli/pyformat.py b/lib/python/qmk/cli/pyformat.py
deleted file mode 100755
index c624f74aeb..0000000000
--- a/lib/python/qmk/cli/pyformat.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Point people to the new command name.
-"""
-import sys
-from pathlib import Path
-
-from milc import cli
-
-
-@cli.argument('-n', '--dry-run', arg_only=True, action='store_true', help="Don't actually format.")
-@cli.subcommand('Pointer to the new command name: qmk format-python.', hidden=False if cli.config.user.developer else True)
-def pyformat(cli):
- """Pointer to the new command name: qmk format-python.
- """
- cli.log.warning('"qmk pyformat" has been renamed to "qmk format-python". Please use the new command in the future.')
- argv = [sys.executable, *sys.argv]
- argv[argv.index('pyformat')] = 'format-python'
- script_path = Path(argv[1])
- script_path_exe = Path(f'{argv[1]}.exe')
-
- if not script_path.exists() and script_path_exe.exists():
- # For reasons I don't understand ".exe" is stripped from the script name on windows.
- argv[1] = str(script_path_exe)
-
- return cli.run(argv, capture_output=False).returncode