From 7db289136255969cc4324070c870b621b49bc383 Mon Sep 17 00:00:00 2001 From: Marvin Vogt Date: Sun, 15 Sep 2024 11:03:24 +0000 Subject: [PATCH] Add just recipe to lint justfile and fix formatting --- justfile | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/justfile b/justfile index 267caa9..9d0d839 100644 --- a/justfile +++ b/justfile @@ -4,29 +4,29 @@ default: check-lockfile lint type-check test # Check if the lockfile is up to date check-lockfile: - uv lock --locked + uv lock --locked # Lint code and check formatting lint +dirs="src tests": lint-justfile - uv run ruff check {{ dirs }} - uv run ruff format --check {{ dirs }} + uv run ruff check {{ dirs }} + uv run ruff format --check {{ dirs }} lint-justfile: - just --check --fmt --unstable + just --check --fmt --unstable # Validate static types using mypy type-check +dirs="src": - uv run mypy {{ dirs }} + uv run mypy {{ dirs }} # Run tests using pytest test $COV=env("CI", "false") $FRR_VERSION=FRR_LATEST_MAJOR_VERSION: - #!/usr/bin/env bash - set -euxo pipefail + #!/usr/bin/env bash + set -euxo pipefail - args=() - ( $COV == "true" ) && args+=( "--cov" ) - uv run pytest tests ${args[@]} + args=() + ( $COV == "true" ) && args+=( "--cov" ) + uv run pytest tests ${args[@]} - if [ $COV = "true" ]; then - uv run coverage xml - fi + if [ $COV = "true" ]; then + uv run coverage xml + fi