pylint-django icon indicating copy to clipboard operation
pylint-django copied to clipboard

Pylint plugin for improving code analysis for when using Django

Results 92 pylint-django issues
Sort by recently updated
recently updated
newest added

updates: - [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0) - [github.com/PyCQA/flake8: 4.0.1 → 5.0.4](https://github.com/PyCQA/flake8/compare/4.0.1...5.0.4) - [github.com/psf/black: 22.3.0 → 22.10.0](https://github.com/psf/black/compare/22.3.0...22.10.0)

# Description Take a boilerplate example from the Django Tables2 [docs](https://django-tables2.readthedocs.io/en/latest/pages/tutorial.html) ```python import django_tables2 as tables from .models import Person class PersonTable(tables.Table): class Meta: model = Person template_name = "django_tables2/bootstrap.html"...

## problem pylint does not recognize `django.utils.decorators.classproperty` is actually like a class method, and expects `self` as the first argument instead of `cls`. ## example In the example below, `my_class_property()`...

When using `mypy` with `--strict`, it requires you to fill in the TypeVar for whichever generic type you're using. For example: ``` from django.contrib import admin from .models import Example...

Both `DJANGO_SETTINGS_MODULE` and `DJANGO_CONFIGURATION` are required for `django.configurations.importer` to install, else it throws an exception. If the `importer` is not installed, `django.setup()` fails on `configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)` when trying to access...

Looks like I managed to reproduce bug #78 # pip freeze contents ``` asgiref==3.4.1 astroid==2.6.6 Django==3.2.6 isort==5.9.3 lazy-object-proxy==1.6.0 mccabe==0.6.1 pylint==2.9.6 pylint-django==2.4.4 pylint-plugin-utils==0.6 pytz==2021.1 sqlparse==0.4.1 toml==0.10.2 wrapt==1.12.1 ``` # offending code...

When editing the Django project's `settings.py`, when calling `pylint` we get a Django error message saying the config was not properly set, even though we correctly pass the flag `--django-settings-module`....

Following this example: https://docs.djangoproject.com/en/4.0/topics/auth/passwords/#writing-your-own-validator eg: ```py class MinimumLengthValidator: def validate(self, password, user=None): ... ``` results in an `unused-argument` error being raised by pylint for `user`. Would it be possible to...