RedisBloom / redisbloom-py

Python client for Redisbloom
https://redisbloom.io
BSD 3-Clause "New" or "Revised" License
76 stars 11 forks source link

format and check the style of Python code in PEP8 compliant manner #26

Open filipecosta90 opened 3 years ago

filipecosta90 commented 3 years ago

Blackened code looks the same regardless of the project and this is why I believe we should format and check for black style on commits.

chayim commented 3 years ago

@filipecosta90 Black and yapf aren't the most stable. I'm more a fan of pep8, flake8, pyflakes, mccabe enforcement. You can wire them up to repo hooks locally if you want (that's what I do for pre-commit triggers in python repos).

The advantage is they don't rewrite your source code. The disadvantage is that they don't rewrite yours source code.

filipecosta90 commented 3 years ago

@filipecosta90 Black and yapf aren't the most stable. I'm more a fan of pep8, flake8, pyflakes, mccabe enforcement. You can wire them up to repo hooks locally if you want (that's what I do for pre-commit triggers in python repos).

The advantage is they don't rewrite your source code. The disadvantage is that they don't rewrite yours source code.

@chayim with regards to format stability do you think that is a "real" issue? docs :

Black is a PEP 8 compliant opinionated formatter. Black reformats entire files in place. Style configuration options are deliberately limited and rarely added.

Noneteless as long as we enforce some format I'm 100% in agreement. I've changed the name of the issue to: "format and check the style of Python code in PEP8 compliant manner"

chayim commented 3 years ago

Absolutely. I'm pro format checks, I don't care which. The benefit of McCabe and friends is that you can also get cyclometric conplexity checks. But again, any formatter.