Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/isort-and-black-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# GitHub Action that uses Black to reformat the Python code in an incoming pull request.
# If all Python code in the pull request is compliant with Black then this Action does nothing.
# Othewrwise, Black is run and its changes are committed back to the incoming pull request.
# https://github.com/cclauss/autoblack

name: isort and black check
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install click, black and isort
run: pip install 'click==8.0.4' 'black==23.12.1' 'isort==5.13.2'
- name: Run isort --check .
run: isort --check .
- name: Run black --check .
run: black --check .
# - name: If needed, commit black changes to the pull request
# if: failure()
# run: |
# black .
# git config --global user.name 'autoblack'
# git config --global user.email 'rocky@users.noreply.github.com'
# git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
# git checkout $GITHUB_HEAD_REF
# git commit -am "fixup: Format Python code with Black"
# git push
2 changes: 1 addition & 1 deletion pymathics/hello/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

"""

from pymathics.hello.version import __version__
from pymathics.hello.__main__ import Hello
from pymathics.hello.version import __version__

__all__ = ("__version__", "Hello", "pymathics_version_data")

Expand Down
Loading