From 92404832e5905e2fd8d7967ba65c28571ee3ba64 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 10 Dec 2022 02:00:20 +0100 Subject: [PATCH] group common args in pip-compile task --- tasks.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tasks.py b/tasks.py index e714c88..03e4ca1 100644 --- a/tasks.py +++ b/tasks.py @@ -13,19 +13,20 @@ TEST_ENV = {"ENV_FILE": BASE_DIR / "envs" / "test-envs.env"} @task def update_dependencies(ctx): + common_args = "--allow-unsafe --resolver=backtracking --upgrade" with ctx.cd(BASE_DIR): ctx.run( - "pip-compile --allow-unsafe --resolver=backtracking --generate-hashes --upgrade requirements.in", + f"pip-compile {common_args} --generate-hashes requirements.in", pty=True, echo=True, ) ctx.run( - "pip-compile --allow-unsafe --resolver=backtracking --strip-extras --upgrade -o constraints.txt requirements.in", + f"pip-compile {common_args} --strip-extras -o constraints.txt requirements.in", pty=True, echo=True, ) ctx.run( - "pip-compile --allow-unsafe --resolver=backtracking --generate-hashes --upgrade requirements-dev.in", + f"pip-compile {common_args} --generate-hashes requirements-dev.in", pty=True, echo=True, )