KCore: force -r8 for fortran #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: autopep8 formatter | |
on: | |
push: | |
branches: | |
- main | |
# pull_request: | |
# branches: | |
# - main | |
jobs: | |
autopep8: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install autopep8 | |
run: pip install autopep8 | |
- name: Run autopep8 | |
run: | | |
pythonFiles=`find Cassiopee/ -type f -not -path "*/build/*" -not -path "*/ThirdParty/*" -name "*.py" -not -name "Internal.py"` | |
errorCodes="E101,E11,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E251,E252,E711,E713,E714,E721,E722,W291,W293,W391" | |
autopep8 --in-place --indent-size=4 --select=$errorCodes $pythonFiles | |
autopep8 --in-place --indent-size=2 --select=$errorCodes Cassiopee/Converter/Converter/Internal.py | |
- name: Commit changes | |
run: | | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Apply autopep8 formatting" || true | |
- name: Push changes | |
run: git push origin ${{ github.ref }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |