Firstly, thank you for considering to contribute to python-mysql-replication
. We appreciate your effort, and to ensure that your contributions align with the project's coding standards, we employ the use of pre-commit
hooks. This guide will walk you through setting them up.
-
Install pre-commit
Before you can use
pre-commit
, you need to install it. You can do so usingpip
:pip install pre-commit
-
Install the pre-commit hooks
Navigate to the root directory of your cloned
python-mysql-replication
repository and run:pre-commit install
This will install the
pre-commit
hooks to your local repository. -
Make sure to stage your changes
pre-commit
will only check the files that are staged in git. So make sure togit add
any new changes you made before runningpre-commit
. -
Run pre-commit manually (Optional)
Before committing, you can manually run:
pre-commit run --all-files
This will run the hooks on all the files. If there's any issue, the hooks will let you know.
If you run into any problems with the hooks, you can always skip them using:
git commit -m "Your commit message" --no-verify
However, please note that skipping hooks might lead to CI failures if we use these checks in our CI pipeline. It's always recommended to adhere to the checks to ensure a smooth contribution process.
That's it! With these steps, you should be well on your way to contributing to python-mysql-replication
. We look forward to your contributions!