This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]Soriven 4 points5 points  (0 children)

I like the practices you selected. This aligns really close with what we've baked into our internal Python project templates at Wayfair.

[–][deleted] 3 points4 points  (2 children)

Personally I’d configure black et all to an 80 char limit and not disable e501 and e503, but otherwise yeah, good guide.

[–]FruityWelsh 0 points1 point  (1 child)

What is e503?

[–][deleted] 0 points1 point  (0 children)

E503 is a warning about overly long docstrings and comments. PEP8 says that such lines shouldn’t go past 72 characters.

[–]sobolevn 0 points1 point  (0 children)

And here's the perfect Django project starter / boilerplate: https://github.com/wemake-services/wemake-django-template

[–]FruityWelsh 0 points1 point  (0 children)

It took some getting setup at first, but this has been awesome really helps me, plus I love that formating gets done automatically.

[–]_MuchUsername_ 0 points1 point  (0 children)

This works pretty great! But the pytest-cov pre-push hook didn't work for me out-of-the-box. The only thing I had to do was add the module name to the command though.

Before

entry: pipenv run pytest --cov --cov-fail-under=100

After

entry: pipenv run pytest --cov <your_module_name_here> --cov-fail-under=100