From 3066b2c336b1cc45fb120443ce3feb54557ed715 Mon Sep 17 00:00:00 2001 From: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com> Date: Sun, 7 Jul 2024 13:41:13 +0530 Subject: [PATCH] Add guidlines to how to format python files according to black formatter Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com> --- .github/workflows/python_formatter.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/python_formatter.yaml b/.github/workflows/python_formatter.yaml index e9dd0a311f..ba470cad84 100644 --- a/.github/workflows/python_formatter.yaml +++ b/.github/workflows/python_formatter.yaml @@ -7,6 +7,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + + - name: Python Files Formatting Guidelines + run: | + echo "### Python Files Formatting Guidelines ### + If there is a formatting errors in your python files, + 1. First install black + It requires Python 3.8+ to run. + Install with "pip install black" and if you use pipx, install Black with "pipx install black" + If you want to format Jupyter Notebooks, install with pip install "black[jupyter]" + + 2. Run the command + "python -m black {source_file_or_directory}" or + "black {source_file_or_directory}" + to format python files. + " - uses: psf/black@stable with: