Skip to content

Commit f181c26

Browse files
committed
YML lint config file
1 parent 4d4fe32 commit f181c26

2 files changed

Lines changed: 35 additions & 32 deletions

File tree

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
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
1+
# GitHub Action that uses Black to reformat the Python code in an
2+
# incoming pull request. If all Python code in the pull request is
3+
# compliant with Black then this Action does nothing. Othewrwise,
4+
# Black is run and its changes are committed back to the incoming pull
5+
# request. https://github.com/cclauss/autoblack
56

7+
---
68
name: isort and black check
79
on: [pull_request]
810
jobs:
911
build:
1012
runs-on: ubuntu-latest
1113
steps:
12-
- uses: actions/checkout@v5
14+
- uses: actions/checkout@v6
1315
- name: Set up Python 3.14
14-
uses: actions/setup-python@v5
16+
uses: actions/setup-python@v6
1517
with:
16-
python-version: 3.13
18+
python-version: 3.14
1719
- name: Install click, black and isort
18-
run: pip install 'click==8.0.4' 'black==25.1.0' 'isort==5.13.2'
20+
run: pip install 'click==8.2.1' 'black==25.11.0' 'isort==8.0.1'
1921
- name: Run isort --check .
2022
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
23+
- name: Run black --check --diff .
24+
run: black --check --diff .
25+
# - name: If needed, commit black changes to the pull request
26+
# if: failure()
27+
# run: |
28+
# black .
29+
# git config --global user.name 'autoblack'
30+
# git config --global user.email 'rocky@users.noreply.github.com'
31+
# git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
32+
# git checkout $GITHUB_HEAD_REF
33+
# git commit -am "fixup: Format Python code with Black"
34+
# git push

.pre-commit-config.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1+
---
12
default_language_version:
23
python: python
34
repos:
4-
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
56
rev: v4.0.1
67
hooks:
7-
- id: check-merge-conflict
8-
- id: debug-statements
9-
stages: [commit]
10-
- id: end-of-file-fixer
11-
stages: [commit]
12-
- id: trailing-whitespace
13-
- repo: https://github.com/psf/black
8+
- id: check-merge-conflict
9+
- id: debug-statements
10+
stages: [commit]
11+
- id: end-of-file-fixer
12+
stages: [commit]
13+
- id: trailing-whitespace
14+
- repo: https://github.com/psf/black
1415
rev: 25.11.0
1516
hooks:
16-
- id: black
17-
language_version: python3
18-
exclude: 'mathicsscript/version.py'
19-
- repo: https://github.com/pycqa/flake8
17+
- id: black
18+
language_version: python3
19+
exclude: 'pymathics/icu/version.py'
20+
- repo: https://github.com/pycqa/flake8
2021
rev: 3.9.2
2122
hooks:
2223
- id: flake8

0 commit comments

Comments
 (0)