Skip to content

Adding Pre-commit hooks#47

Merged
igorbenav merged 2 commits intobenavlabs:mainfrom
castroofelipee:main
Jun 30, 2025
Merged

Adding Pre-commit hooks#47
igorbenav merged 2 commits intobenavlabs:mainfrom
castroofelipee:main

Conversation

@castroofelipee
Copy link
Copy Markdown
Contributor

Pre-commit Hooks

Hi, everyone!

This PR introduces pre-commit support to improve code quality and consistency by:

  • Adding .pre-commit-config.yaml with hooks for:

    • trailing whitespace removal, end-of-file fixer, and large file checks
    • ruff for linting and formatting
    • mypy for static type checking
  • Adding pre-commit as a development dependency in pyproject.toml

  • Updating CONTRIBUTING.md with instructions on how to install and use pre-commit hooks

Automating these checks helps maintain a cleaner codebase, reduces manual errors, and enforces the project's coding standards before commits are made.

Testing

  • Verified local installation of pre-commit hooks
  • Ran hooks manually and verified fixes and type checking
  • Ensured all existing tests pass after changes

Example of using

image

@igorbenav
Copy link
Copy Markdown
Collaborator

Very nice enhancement, @castroofelipee, thanks!

@igorbenav igorbenav merged commit 065a408 into benavlabs:main Jun 30, 2025
6 checks passed
@igorbenav igorbenav added the enhancement New feature or request label Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants