flake8-django
flake8-django copied to clipboard
A flake8 plugin to detect bad practices on Django projects.
Hi! Is there any reason for the `flake8` upper constraint? https://github.com/rocioar/flake8-django/blob/808284f7e0227c6e7ad9f6d4721c6b79c1b863be/pyproject.toml#L27 Version 6 of `flake8` was recently released (https://flake8.pycqa.org/en/latest/release-notes/6.0.0.html) but I can't upgrade because of this upper constraint. Here are...
I just started using `flake8-django` to evaluate it. Thanks for this great project! I have the following models: ```python class AbstractModel(models.Model): class Meta: abstract = True name = models.CharField(_('Name'), max_length=100)...
Update the license classifier to match the licance stated in the [licance metadata](https://github.com/rocioar/flake8-django/blob/master/pyproject.toml#L4). Closes #101
Just noting that you have MIT set as the licensing classifier in the pyproject.toml. Presumably not the intent with the license metadata saying GPL-3.0 and README saying GPL.
Example: ```python from django import forms class ExampleForm(forms.ModelForm): pass ``` This plugin won't find this as error.
Hello, The new DJ13 `@receiver decorator must be on top of all the other decorators is not possible to fix if it's combined with '@staticmethid'` E.g ```python class MyModel(models.Model) @staticmethod...
Detect wrong django settings import: ```python from .settings import DEBUG # should detect from django.conf import settings # ok ``` https://docs.djangoproject.com/en/dev/topics/settings/#using-settings-in-python-code
From https://docs.djangoproject.com/en/2.2/ref/applications/#configuring-applications: > default_app_config allows applications that **predate Django 1.7** such as django.contrib.admin to opt-in to AppConfig features without requiring users to update their INSTALLED_APPS. > **New applications should avoid...
Today flake8-django fails to find model declarations that aren't inheriting from the `model_name_lookup`. This means that models inheriting mixins or abstract models aren't checked at all. My proposal is to...