From 2137d514322e4b67f2f0290d8415abf3fd691da8 Mon Sep 17 00:00:00 2001 From: Erovia Date: Wed, 27 Nov 2019 21:27:06 +0100 Subject: CLI: Add development mode support Hide development specific options and don't require dev modules unless `user.developer` is set to `True`. --- lib/python/qmk/cli/hello.py | 2 +- lib/python/qmk/cli/pyformat.py | 2 +- lib/python/qmk/cli/pytest.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/python/qmk/cli') diff --git a/lib/python/qmk/cli/hello.py b/lib/python/qmk/cli/hello.py index bee28c3013..5119188a07 100755 --- a/lib/python/qmk/cli/hello.py +++ b/lib/python/qmk/cli/hello.py @@ -6,7 +6,7 @@ from milc import cli @cli.argument('-n', '--name', default='World', help='Name to greet.') -@cli.subcommand('QMK Hello World.') +@cli.subcommand('QMK Hello World.', hidden=False if cli.config.user.developer else True) def hello(cli): """Log a friendly greeting. """ diff --git a/lib/python/qmk/cli/pyformat.py b/lib/python/qmk/cli/pyformat.py index a53ba40c0a..1464443804 100755 --- a/lib/python/qmk/cli/pyformat.py +++ b/lib/python/qmk/cli/pyformat.py @@ -5,7 +5,7 @@ from milc import cli import subprocess -@cli.subcommand("Format python code according to QMK's style.") +@cli.subcommand("Format python code according to QMK's style.", hidden=False if cli.config.user.developer else True) def pyformat(cli): """Format python code according to QMK's style. """ diff --git a/lib/python/qmk/cli/pytest.py b/lib/python/qmk/cli/pytest.py index 09611d750f..5417a9cb34 100644 --- a/lib/python/qmk/cli/pytest.py +++ b/lib/python/qmk/cli/pytest.py @@ -7,7 +7,7 @@ import subprocess from milc import cli -@cli.subcommand('QMK Python Unit Tests') +@cli.subcommand('QMK Python Unit Tests', hidden=False if cli.config.user.developer else True) def pytest(cli): """Run several linting/testing commands. """ -- cgit v1.2.3