From 843ed98f7666192b36bbd20d3486c9d935343dcd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 9 Aug 2024 16:28:38 -0500 Subject: [PATCH] =?utf8?q?=F0=9F=94=A8=20Update=20docs.py=20script=20to=20?= =?utf8?q?enable=20dirty=20reload=20conditionally=20(#1060)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- scripts/docs.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/docs.py b/scripts/docs.py index 8efcdda5..d018ace8 100644 --- a/scripts/docs.py +++ b/scripts/docs.py @@ -104,7 +104,7 @@ def verify_readme() -> None: @app.command() -def live() -> None: +def live(dirty: bool = False) -> None: """ Serve with livereload a docs site for a specific language. @@ -115,11 +115,10 @@ def live() -> None: en. """ # Enable line numbers during local development to make it easier to highlight - subprocess.run( - ["mkdocs", "serve", "--dev-addr", "127.0.0.1:8008", "--dirty"], - env={**os.environ, "LINENUMS": "true"}, - check=True, - ) + args = ["mkdocs", "serve", "--dev-addr", "127.0.0.1:8008"] + if dirty: + args.append("--dirty") + subprocess.run(args, env={**os.environ, "LINENUMS": "true"}, check=True) @app.command() -- 2.47.2