keyboard stuff
1"""Clean the QMK firmware folder of build artifacts.
2"""
3from subprocess import DEVNULL
4
5from qmk.commands import find_make
6from milc import cli
7
8
9@cli.argument('-a', '--all', arg_only=True, action='store_true', help='Remove *.hex and *.bin files in the QMK root as well.')
10@cli.subcommand('Clean the QMK firmware folder of build artifacts.')
11def clean(cli):
12 """Runs `make clean` (or `make distclean` if --all is passed)
13 """
14 cli.run([find_make(), 'distclean' if cli.args.all else 'clean'], capture_output=False, stdin=DEVNULL)