Skip to content

Commit

Permalink
Add guidlines to how to format python files according to black formatter
Browse files Browse the repository at this point in the history
Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
  • Loading branch information
hansinikarunarathne committed Jul 7, 2024
1 parent 5e9f5ac commit 3066b2c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/python_formatter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3066b2c

Please sign in to comment.