python-discord / django-crispy-bulma

Django application to add 'django-crispy-forms' layout objects for Bulma.io
MIT License
25 stars 9 forks source link

Add pep8-naming and more pre-commit hooks #33

Closed MarkKoz closed 4 years ago

MarkKoz commented 4 years ago

Relevant Issues

python-discord/organisation#138 python-discord/organisation#153

Description

New hooks were added for pre-commit and they will run in CI too. pep8-naming was added as a flake8 plugin to ensure names comply with PEP 8.

Hooks added

A couple of these hooks automatically apply fixes. However, they still report failure and leave any changes they make uncommitted. Therefore, the user has to commit the automatic fixes.

Reasoning

Additional Details

The pre-commit venv is cached. There should only be a cache miss if the .pre-commit-config.yaml file changes or if the location of the Python interpreter changes (more realistically, if the Python version changes). Maybe Azure wipes the cache sometimes too, but in that case pre-commit will simply re-create the environment.

MarkKoz commented 4 years ago

Need thoughts on if it's OK that pre-commit relies on the local environment for flake8.

lemonsaurus commented 4 years ago

I don't think we should continue work on this repo, so I'm gonna close this PR.