feat: added pre-commit workflow and updated .pre-commit.config file #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pre-Commit Workflow and Configuration Update
Description
This pull request introduces improvements to the code quality and consistency through the following changes:
GitHub Actions Workflow:
A new workflow has been added at
.github/workflows/pre-commit.ymlto automatically run pre-commit checks on pushes and pull requests to the main branch.Python 3.11 and Pre-Commit Installation:
Installs Python 3.11 and the
pre-commitframework.Project-Specific Pre-Commit Configuration:
Loads the project-specific pre-commit configuration, with a fallback to a global config if none exists.
Pre-Commit Hook Execution:
Runs all pre-commit hooks, captures full logs, and outputs a summary of failed hooks, affected files, and error details.
.pre-commit-config.yaml Update:
Updates the
.pre-commit-config.yamlfile with the latest hooks and settings to enforce consistent code formatting and quality across the repository.Motivation
Automating pre-commit checks ensures that all commits and pull requests adhere to the project's code standards. This approach reduces potential errors, improves maintainability, and encourages contributors to follow best practices consistently.
Issue
Fixes #19