File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change
1
+ # GitHub Action that uses Black to reformat the Python code in an incoming pull request.
2
+ # If all Python code in the pull request is compliant with Black then this Action does nothing.
3
+ # Othewrwise, Black is run and its changes are committed back to the incoming pull request.
4
+ # https://github.com/cclauss/autoblack
5
+
6
+ name : isort and black check
7
+ on : [pull_request]
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ - name : Set up Python 3.13
14
+ uses : actions/setup-python@v5
15
+ with :
16
+ python-version : 3.13
17
+ - name : Install click, black and isort
18
+ run : pip install 'click==8.0.4' 'black==23.12.1' 'isort==5.13.2'
19
+ - name : Run isort --check .
20
+ run : isort --check .
21
+ - name : Run black --check .
22
+ run : black --check .
23
+ # - name: If needed, commit black changes to the pull request
24
+ # if: failure()
25
+ # run: |
26
+ # black .
27
+ # git config --global user.name 'autoblack'
28
+ # git config --global user.email 'rocky@users.noreply.github.com'
29
+ # git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
30
+ # git checkout $GITHUB_HEAD_REF
31
+ # git commit -am "fixup: Format Python code with Black"
32
+ # git push
Original file line number Diff line number Diff line change 27
27
28
28
"""
29
29
30
- from pymathics .hello .version import __version__
31
30
from pymathics .hello .__main__ import Hello
31
+ from pymathics .hello .version import __version__
32
32
33
33
__all__ = ("__version__" , "Hello" , "pymathics_version_data" )
34
34
You can’t perform that action at this time.
0 commit comments