Skip to content

fix linting number 2568848 #34

fix linting number 2568848

fix linting number 2568848 #34

Workflow file for this run

name: Reformat code
on: [push]
jobs:
reformat:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
pip install py-cord
pip install simpleeval
pip install tinydb
pip install aiohttp==3.6.2
pip install nekosbest
pip install --upgrade aiohttp
pip install autopep8
pip install git+https://github.com/psf/black
- name: Create log files
run: |
mkdir ref-logs
touch ref-logs/autopep8-reformat.txt
touch ref-logs/black-reformat.txt
echo LOGFILE_NAME="logs-$(python3 -V | cut -c 8-)" >> $GITHUB_ENV
- name: AutoPEP8 code reformatting
run: |
for f in $(git ls-files '*.py'); do
echo "Reformatting" $f >> ref-logs/autopep8-reformat.txt
autopep8 -i $f >> ref-logs/autopep8-reformat.txt
done
- name: Black code reformatting
run: |
for f in $(git ls-files '*.py'); do
echo "Reformatting" $f >> ref-logs/black-reformat.txt
python -m black $f >> ref-logs/black-reformat.txt
done
- uses: actions/upload-artifact@v4
with:
name: ${{env.LOGFILE_NAME}}
path: ref-logs/
- name: Remove log files
run: |
rm -r ref-logs
- uses: stefanzweifel/git-auto-commit-action@v4