ElectricPy icon indicating copy to clipboard operation
ElectricPy copied to clipboard

Enforcing `black` for python code formatting

Open Lakshmikanth2001 opened this issue 3 years ago • 4 comments

021cfe787fb3d9ac28167b73eafb1198c46dffc4 Sir as our code base is growing in size i want a uniform python code format across all our modules please review it and give your valuable feed bak

Lakshmikanth2001 avatar Feb 24 '22 15:02 Lakshmikanth2001

I'm hesitant with black formatting. I know it's the standard, but there are so many formatting rules that I don't agree with. I've reviewed your PR, and you've managed to make it look VERY good overall. There's a handful of things that the black formatter seems to have gone "too far" with; however, if we're able to get those pieces under control, I think it'll be worth updating. If we're unable to get those pieces, I think it'll be enough to stick with pylint (which is my preference).

engineerjoe440 avatar Mar 08 '22 04:03 engineerjoe440

Black is a PEP 8 compliant opinionated formatter with format whereas pylint is a code linter

  • pylint just informs where the errors might occur, import optimization, suggest code style
  • black will format your code insted

Lakshmikanth2001 avatar Mar 08 '22 15:03 Lakshmikanth2001

I've sat on this and been slow; which reflects poorly on me as a maintainer. I want to say though, I've come around to agree with you completely. Not only should we make this repo Black compliant. I think we NEED to have Black compliance in the repo.

I'm definitely onboard! :) Thank you for your persistence, and your patience! :smile:

engineerjoe440 avatar May 06 '22 17:05 engineerjoe440

Removing milestone association since this isn't ready to "roll" yet.

engineerjoe440 avatar Aug 28 '22 16:08 engineerjoe440