-
-
Notifications
You must be signed in to change notification settings - Fork 186
python3 setup.py lint
is deprecated: Let's lint with pre-commit
#2772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ on: | |
- '**.c' | ||
- '**.py' | ||
- '**.rst' | ||
- '.pre-commit-config.yaml' | ||
|
||
pull_request: | ||
branches: main | ||
|
@@ -19,12 +20,22 @@ on: | |
- '**.c' | ||
- '**.py' | ||
- '**.rst' | ||
- '.pre-commit-config.yaml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-format-lint | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/[email protected] | ||
|
||
format-lint-code-check: | ||
runs-on: ubuntu-22.04 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Learn more about this config here: https://pre-commit.com/ | ||
|
||
# To enable these pre-commit hooks run: | ||
# `brew install pre-commit` or `python3 -m pip install pre-commit` | ||
# Then in the project root directory run `pre-commit install` | ||
|
||
repos: | ||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 24.3.0 | ||
hooks: | ||
- id: black | ||
exclude: | | ||
(?x)^( | ||
^buildconfig/.*$ | ||
| ^docs/reST/.*$ | ||
| setup.py | ||
)$ | ||
|
||
|
||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v18.1.2 | ||
hooks: | ||
- id: clang-format | ||
exclude: | | ||
(?x)^( | ||
^src_c/_sdl2/.*$ | ||
| ^src_c/doc/.*$ | ||
| docs/reST/_static/script.js | ||
| docs/reST/_templates/header.h | ||
| src_c/include/sse2neon.h | ||
| src_c/pypm.c | ||
Comment on lines
+26
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For future reference if/when these want to be removed, I'm leaving some rationale for keeping them excluded: |
||
)$ |
Uh oh!
There was an error while loading. Please reload this page.