Skip to content

Enhance Code Quality with Ruff, Black, and Pre-commit #456

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

Conversation

soulee-dev
Copy link
Contributor

Description:

I've made some changes that I believe will enhance the code quality of the python-mysql-replication project. Here are the improvements made:

  1. GitHub Actions with ruff and black: I've set up a GitHub Actions workflow that runs both ruff and black. This will help ensure that all code contributions adhere to the desired coding standards. If a commit does not comply with these standards, the CI checks will fail, prompting the contributor to make necessary changes.

  2. Pre-commit Setup: To make it easier for contributors, I've added a pre-commit hook that will automatically format the code using ruff and black every time a commit is made. This not only saves time but also ensures that each commit is formatted correctly before it's even pushed.

  3. CONTRIBUTING.md: I've added a CONTRIBUTING.md file that provides guidelines on how to set up and use the pre-commit hooks. This will help new contributors get started and ensure consistency in contributions.

  4. Code Formatting: Lastly, I've gone through the existing code and reformatted it using Ruff and Black to ensure it complies with the new standards.

I believe these changes will greatly improve the overall code quality and maintainability of the project. I'm open to feedback and would love to collaborate further on refining this!

@julien-duponchelle
Copy link
Owner

Awesome !

@julien-duponchelle
Copy link
Owner

Can you help me to solve the conflicts ?

@soulee-dev
Copy link
Contributor Author

Sure! I'll solve conflicts ASAP.

@soulee-dev
Copy link
Contributor Author

I fixed all conflicts!

@julien-duponchelle
Copy link
Owner

Sorry I introduced more conflict .. I have try quickly to solve #475 but test failed . I will come back to it later.

@soulee-dev
Copy link
Contributor Author

@julien-duponchelle I fix all conflicts. Ready-to-be-merged!

@julien-duponchelle
Copy link
Owner

Amazing

@julien-duponchelle julien-duponchelle merged commit 8e17fb2 into julien-duponchelle:main Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants