Skip to content

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

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

Merged
merged 2 commits into from
Aug 17, 2025

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Jul 12, 2025

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
Copy link
Contributor Author

cclauss commented Jul 25, 2025

@JonathanHuot Your review please.

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

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

@JonathanHuot JonathanHuot merged commit 5d0e2cc into oauthlib:master Aug 17, 2025
15 checks passed
@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