p5 icon indicating copy to clipboard operation
p5 copied to clipboard

Configure pre-commit to run black, flake8, and Isort before commits.

Open AdityyaX opened this issue 1 year ago • 2 comments

#452

Hi @tushar5526 sir,

I've just submitted a pull request that aims to set up pre-commit to run black, flake8,isort before commits I would greatly appreciate it if you could take some time to review it.

Details:

  • Black: : code formatter
  • Flake8: Checks Python code against standards
  • Isort: Organizes and sorts import statements

Changes done:

  • Points for Review: .pre-commit-config.yaml file added
Screenshot 2023-12-05 at 1 09 56 PM

Expected Behaviour:

https://github.com/p5py/p5/assets/103623274/f64dd9d5-eb58-4b74-af5d-da3661423e4e

Your suggestions and feedback would be extremely beneficial in ensuring the quality and functioning of these update

AdityyaX avatar Dec 05 '23 07:12 AdityyaX

Hey @AdityyaX, no need to refer to me as sir here 😅

Can you make this part of GitHub CI?

I believe we would have to solve the flake8 errors as well. It is a hard problem - you can make a different PR or make it part of this one.

tushar5526 avatar Dec 06 '23 16:12 tushar5526

@tushar5526 Absolutely, I'll do my best to assist you with it!

AdityyaX avatar Dec 06 '23 17:12 AdityyaX