Plugin to catch bad style specific to Django Projects
Project description
flake8-django
A flake8 plugin for Django projects.
Installation
Install from pip with:
$ pip install flake8-django
Testing
flake8-django uses pytest for tests. To run them use:
$ pytest
Run coverage report using:
$ pytest --cov=.
List of warnings
Warning | Description |
---|---|
DJ01 |
Using null=True is not recommended for some of the Django ORM fields. E.g. CharField , EmailField , ImageField , FileField , BooleanField , UUIDField , SlugField , TextField |
DJ02 |
Using blank=True is not recommended on BooleanField , use NullBooleanField instead |
DJ03 |
Using locals() in render function is not recommended, use explicit arguments |
DJ04 |
Using dashes in url names is discouraged, use underscores instead |
DJ05 |
URLs include() should set a namespace |
Licence
GPL
Thanks
@stummjr for teaching me AST, and what I could do with it. His blog is cool.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flake8-django-0.0.3.tar.gz
(17.0 kB
view hashes)
Built Distributions
flake8_django-0.0.3-py3.7.egg
(34.2 kB
view hashes)
Close
Hashes for flake8_django-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af4b240de5a8bac27ea2596b9b4860aad052922fa8a347e28d09a898fee29f42 |
|
MD5 | 969b8ed59c074d55dd2ab30ee44a8418 |
|
BLAKE2b-256 | fe86a8e3f1057294011b46495318dda342c97c067e28a99d66beaf09a606090d |