pylint-django
pylint-django copied to clipboard
Pylint plugin for improving code analysis for when using Django
At time of writing, [`CHANGELOG.md`](https://github.com/pylint-dev/pylint-django/blob/df570bb91f80a4e5a03d823ab39857e2e83b5777/CHANGELOG.rst) only records versions up to 2.5.3, plus the unreleased 2.6.0: 2.5.4 and 2.5.5 are missing. I note that [2.5.4 was "yanked"](https://pypi.org/project/pylint-django/2.5.4/) from PyPI, but it...
This is a reminder to myself. I think it'd be useful to add a warning to this checker to notify users using older Django versions, especially ones which have passed...
### models.py ```python from django.db import models class Category(models.Model): name = models.CharField("name", max_length=100) class Movie(models.Model): categories = models.ManyToManyField(Category, related_name="movies") created_at = models.DateTimeField("created_at", auto_now_add=True) def __str__(self): test = "" # for...
When using pylint django if in model `__str__` method a field is returned pylint cannot recognize that this field should be a string. ```python from django.db import models class Model(models.Model):...
``` from __future__ import annotations from django.db import models class Author(models.Model): name: str = models.CharField(max_length=200) def func(self) -> str: return self.name class Book(models.Model): author: Author = models.ForeignKey(Author, on_delete=models.CASCADE) def author_name(self):...
Hello, running the latest version of pylint and pylint-django fails with `ModuleNotFoundError: No module named 'config' ` and `KeyError: 'Command line or configuration file'`. This is very similar to https://github.com/PyCQA/pylint-django/issues/370...
I have installed and setup pylint_django and when running from the command line I am not receiving an error. But when run from vscode itself pylint crashes due to Syntax...
### Bug description Possibly related to: https://github.com/pylint-dev/pylint/issues/8554 Pylint consistently crashes across all versions including latest, on one particular file, throwing 'AstroidError' mentioning 'inference_tip.py' and '_inference_tip_cached'. ### Configuration _No response_ ###...
Added two additional suppressions: 1. Suppress `useless-super-delegation` when docstrings are different in functions as it can be used in generating documentation for example in Swagger. ```py class NewView(ViewSet): def list(self):...
Fix #385 The issue is that creating the `Settings` objects already configures the `settings`.