From a67872e7a8137a65cc44d260a666a9e87c56d3cc Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 3 Jul 2024 10:59:21 +0200 Subject: [PATCH] docs: correcting CONTRIBUTING hatch commands (#7963) * fixing CONTRIBUTING hatch commands * updating CONTRIBUTING.MD * Update CONTRIBUTING.md Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com> --------- Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com> --- CONTRIBUTING.md | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0e9febb40..f8eac14ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -222,20 +222,43 @@ options you would normally pass to `pytest`, for example: hatch run test:unit test/test_logging.py::TestSkipLoggingConfiguration::test_skip_logging_configuration ``` -We also use tools to ensure consistent code style, quality, and static type checking. The quality of your code will be -tested by the CI, but once again, running the checks locally will speed up the review cycle. To check your code you -can run: +### Run code quality checks locally +We also use tools to ensure consistent code style, quality, and static type checking. The quality of your code will be +tested by the CI, but once again, running the checks locally will speed up the review cycle. + + +To check your code type checking, run: ```sh -hatch run test:lint +hatch run test:type ``` + +To check your code format run: +```sh +hatch run format-check +``` + + +To format your code, you can run: +```sh +hatch run format +```` + + +To check your code style according to linting rules run: +```sh +hatch run check +hatch run test:lint +```` + + If the linters spot any error, you can fix it before checking in your code: - ```sh -hatch run test:lint-fix +hatch run fix ``` + ## Requirements for Pull Requests To ease the review process, please follow the instructions in this paragraph when creating a Pull Request: