Skip to content

Add pre-commit to run linters, formatters, etc. on code changes - #918

Merged
JonathanHuot merged 2 commits into
oauthlib:masterfrom
cclauss:pre-commit
Aug 17, 2025
Merged

JonathanHuot merged 2 commits into
oauthlib:masterfrom
cclauss:pre-commit

Conversation

@cclauss

@cclauss cclauss commented Jul 12, 2025 •

Copy link
Copy Markdown
Contributor

https://pre-commit.com

Add pre-commit which can be run locally on developers' machines and also in GitHub Actions.

To enable these pre-commit hooks run:

  1. uv tool install pre-commit or pipx install pre-commit or brew install pre-commit, etc.
  2. In the project root directory run pre-commit install

In GitHub Actions:
% pre-commit run --show-diff-on-failure --color=always --all-files

check for added large files..............................................Passed
check python ast.........................................................Passed
check builtin type constructor use.......................................Passed
check for case conflicts.................................................Passed
check that executables have shebangs.....................................Passed
check json...........................................(no files to check)Skipped
check for merge conflicts................................................Passed
check that scripts with shebangs are executable..........................Passed
check for broken symlinks............................(no files to check)Skipped
check toml...............................................................Passed
check vcs permalinks.....................................................Passed
check xml............................................(no files to check)Skipped
check yaml...............................................................Passed
debug statements (python)................................................Passed
detect destroyed symlinks................................................Passed
fix end of files.........................................................Passed
file contents sorter.................................(no files to check)Skipped
fix utf-8 byte order marker..............................................Passed
forbid new submodules................................(no files to check)Skipped
forbid submodules....................................(no files to check)Skipped
mixed line ending........................................................Passed
fix requirements.txt.....................................................Passed
sort simple yaml files...............................(no files to check)Skipped
trim trailing whitespace.................................................Passed
codespell................................................................Passed
ruff check...............................................................Passed

@cclauss

cclauss commented Jul 25, 2025

Copy link
Copy Markdown
Contributor Author

@JonathanHuot Your review please.

@JonathanHuot JonathanHuot added this to the 3.3.2 milestone Aug 17, 2025
@JonathanHuot

Copy link
Copy Markdown
Member

Thank you @cclauss , nice work as usual! Sorry for the delay.

@JonathanHuot
JonathanHuot merged commit 5d0e2cc into oauthlib:master Aug 17, 2025
@cclauss
cclauss deleted the pre-commit branch August 17, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants