diff options
author | Erovia <erovia@users.noreply.github.com> | 2019-11-27 21:27:06 +0100 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2020-04-08 09:31:14 -0700 |
commit | c61f016fa491502920941fd03cdab6453d126e67 (patch) | |
tree | 1f8f6b4cbaf2b158604d47f01dc42fc69cac365a /lib/python | |
parent | ea7e40bae17897fbc613e0965d076a7a25b14ea6 (diff) | |
download | qmk_firmware-c61f016fa491502920941fd03cdab6453d126e67.tar.gz qmk_firmware-c61f016fa491502920941fd03cdab6453d126e67.zip |
CLI: Add development mode support
Hide development specific options and don't require dev modules unless
`user.developer` is set to `True`.
Diffstat (limited to 'lib/python')
-rwxr-xr-x | lib/python/qmk/cli/hello.py | 2 | ||||
-rwxr-xr-x | lib/python/qmk/cli/pyformat.py | 2 | ||||
-rw-r--r-- | lib/python/qmk/cli/pytest.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/hello.py b/lib/python/qmk/cli/hello.py index bee28c301..5119188a0 100755 --- a/lib/python/qmk/cli/hello.py +++ b/lib/python/qmk/cli/hello.py | |||
@@ -6,7 +6,7 @@ from milc import cli | |||
6 | 6 | ||
7 | 7 | ||
8 | @cli.argument('-n', '--name', default='World', help='Name to greet.') | 8 | @cli.argument('-n', '--name', default='World', help='Name to greet.') |
9 | @cli.subcommand('QMK Hello World.') | 9 | @cli.subcommand('QMK Hello World.', hidden=False if cli.config.user.developer else True) |
10 | def hello(cli): | 10 | def hello(cli): |
11 | """Log a friendly greeting. | 11 | """Log a friendly greeting. |
12 | """ | 12 | """ |
diff --git a/lib/python/qmk/cli/pyformat.py b/lib/python/qmk/cli/pyformat.py index a53ba40c0..146444380 100755 --- a/lib/python/qmk/cli/pyformat.py +++ b/lib/python/qmk/cli/pyformat.py | |||
@@ -5,7 +5,7 @@ from milc import cli | |||
5 | import subprocess | 5 | import subprocess |
6 | 6 | ||
7 | 7 | ||
8 | @cli.subcommand("Format python code according to QMK's style.") | 8 | @cli.subcommand("Format python code according to QMK's style.", hidden=False if cli.config.user.developer else True) |
9 | def pyformat(cli): | 9 | def pyformat(cli): |
10 | """Format python code according to QMK's style. | 10 | """Format python code according to QMK's style. |
11 | """ | 11 | """ |
diff --git a/lib/python/qmk/cli/pytest.py b/lib/python/qmk/cli/pytest.py index 09611d750..5417a9cb3 100644 --- a/lib/python/qmk/cli/pytest.py +++ b/lib/python/qmk/cli/pytest.py | |||
@@ -7,7 +7,7 @@ import subprocess | |||
7 | from milc import cli | 7 | from milc import cli |
8 | 8 | ||
9 | 9 | ||
10 | @cli.subcommand('QMK Python Unit Tests') | 10 | @cli.subcommand('QMK Python Unit Tests', hidden=False if cli.config.user.developer else True) |
11 | def pytest(cli): | 11 | def pytest(cli): |
12 | """Run several linting/testing commands. | 12 | """Run several linting/testing commands. |
13 | """ | 13 | """ |