Skip to content

descriptinc/python-format-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-format-action

GitHub action to apply black formatting + reorder-python-imports

Largely derived from

Example usage

  • Create $GIT_REPO_ROOT_DIR/.github/workflows
  • Create $GIT_REPO_ROOT_DIR/.github/workflows/main.yml

Fill above file file with:

name: "PythonFormatting"

on: [push, pull_request]

jobs:
  formatting:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      # Run reorder-python-imports + black formatter
      - name: Black Code Formatter
        uses: tdeboissiere/python-format-action@master

You can then add a status in your README by adding:

![](https://github.com/ACCOUNT_NAME/REPO_NAME/workflows/PythonFormatting/badge.svg)

If the name of your workflow contains a space, e.g. Python Formatting, use %20:

![](https://github.com/ACCOUNT_NAME/REPO_NAME/workflows/Python%20Formatting/badge.svg)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published