Skip to main content

Plugin to catch bad style specific to Django Projects

Project description

flake8-django

CircleCI

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


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 details)

Uploaded Source

Built Distributions

flake8_django-0.0.3-py3.7.egg (34.2 kB view details)

Uploaded Source

flake8_django-0.0.3-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file flake8-django-0.0.3.tar.gz.

File metadata

  • Download URL: flake8-django-0.0.3.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for flake8-django-0.0.3.tar.gz
Algorithm Hash digest
SHA256 44ae68fe251a7affd39445acc78965d48f86bf37a04f5f647eba318cac1d29e4
MD5 a0648ef00f64befa8f40d9f41811ea73
BLAKE2b-256 becb030d547009b50db648e19f24368a4dd1e1ddc2e254ef0c8d8f7e51698b19

See more details on using hashes here.

Provenance

File details

Details for the file flake8_django-0.0.3-py3.7.egg.

File metadata

  • Download URL: flake8_django-0.0.3-py3.7.egg
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

File hashes

Hashes for flake8_django-0.0.3-py3.7.egg
Algorithm Hash digest
SHA256 0e5292d6ecd7797e40f588c9fe3903eb1a010bf892db7f6a7fb8808956e369db
MD5 624464a48b990dc4ee2fb6551eb0be35
BLAKE2b-256 61ccfc14df5cf677a6dc407b89f57c9180413ba10df6bc35192010b25ab96c8f

See more details on using hashes here.

Provenance

File details

Details for the file flake8_django-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: flake8_django-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for flake8_django-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 af4b240de5a8bac27ea2596b9b4860aad052922fa8a347e28d09a898fee29f42
MD5 969b8ed59c074d55dd2ab30ee44a8418
BLAKE2b-256 fe86a8e3f1057294011b46495318dda342c97c067e28a99d66beaf09a606090d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page