python formatting
This commit is contained in:
@ -4,6 +4,7 @@ from qmk.docs import prepare_docs_build_area, run_docs_command, BUILD_DOCS_PATH
|
||||
|
||||
from milc import cli
|
||||
|
||||
|
||||
@cli.argument('-s', '--serve', arg_only=True, action='store_true', help="Serves the generated docs once built.")
|
||||
@cli.subcommand('Build QMK documentation.', hidden=False if cli.config.user.developer else True)
|
||||
def generate_docs(cli):
|
||||
|
@ -12,9 +12,11 @@ BUILD_PATH = QMK_FIRMWARE / '.build'
|
||||
BUILD_DOCS_PATH = BUILD_PATH / 'docs'
|
||||
DOXYGEN_PATH = BUILD_DOCS_PATH / 'static' / 'doxygen'
|
||||
|
||||
def run_docs_command(cmd, capture_output = False if cli.config.general.verbose else True):
|
||||
|
||||
def run_docs_command(cmd, capture_output=False if cli.config.general.verbose else True):
|
||||
cli.run(['npm', 'run', '--prefix', BUILD_DOCS_PATH, cmd], capture_output=capture_output, check=True, stdin=DEVNULL)
|
||||
|
||||
|
||||
def prepare_docs_build_area():
|
||||
if BUILD_DOCS_PATH.exists():
|
||||
shutil.rmtree(BUILD_DOCS_PATH)
|
||||
|
Reference in New Issue
Block a user