From 39348ee1bc420633f12841aa31db268ac53001a9 Mon Sep 17 00:00:00 2001 From: kurianbenoy Date: Tue, 20 Feb 2024 21:54:58 +0530 Subject: [PATCH] update style checks --- api/README.md | 4 +++- api/requirements.txt | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/api/README.md b/api/README.md index 2495a59..1444bfe 100644 --- a/api/README.md +++ b/api/README.md @@ -29,7 +29,7 @@ modal deploy server.py ## Style checks -- We are using [ruff](https://docs.astral.sh/ruff/), an extremely fast Python linter and code formatter, written in Rust for checking formatting and code styles. +- We are using [ruff](https://docs.astral.sh/ruff/), an extremely fast Python linter and code formatter, written in Rust for checking formatting and code styles. Along with pre-commit to manage ruff as CI for testing style and minor other tests as well. For style checks use the following command: @@ -40,6 +40,8 @@ ruff check . ruff check --fix # Now that our project is passing ruff check, we can run the Ruff formatter via ruff format: ruff format . +# Pre-commit check +pre-commit run --all-files ``` ## Contributing diff --git a/api/requirements.txt b/api/requirements.txt index a055c5d..824c54b 100644 --- a/api/requirements.txt +++ b/api/requirements.txt @@ -1,5 +1,5 @@ fastapi modal==0.56.4822 -pre-commit -ruff - +# dev-requirements +pre-commit==3.6.2 +ruff==0.2.2