Skip to content

Commit cd79ce0

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

2 files changed

Lines changed: 33 additions & 29 deletions

File tree

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
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

6-
name: isort and black check
7+
---
8+
9+
name: black check
710
on: [pull_request]
811
jobs:
912
build:
@@ -16,17 +19,17 @@ jobs:
1619
python-version: 3.13
1720
- name: Install click, black and isort
1821
run: pip install 'click==8.0.4' 'black==25.1.0' 'isort==5.13.2'
19-
- name: Run isort --check .
20-
run: isort --check .
22+
# - name: Run isort --check .
23+
# run: isort --check .
2124
- name: Run black --check .
2225
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
26+
# - name: If needed, commit black changes to the pull request
27+
# if: failure()
28+
# run: |
29+
# black .
30+
# git config --global user.name 'autoblack'
31+
# git config --global user.email 'rocky@users.noreply.github.com'
32+
# git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
33+
# git checkout $GITHUB_HEAD_REF
34+
# git commit -am "fixup: Format Python code with Black"
35+
# 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)