pylint-django
pylint-django copied to clipboard
Pylint plugin for improving code analysis for when using Django
PR pylint-dev/pylint-django#414 switched to ruff, but forgot to add it to the commands section. I've split the PR into 2 commits to showcase that `ruff check` is working. (Its output...
When `scripts/test.sh` was introduced back in commit https://github.com/pylint-dev/pylint-django/commit/55cb670049b1d2d2219ea0968ef55f1e914e055d, [`test_func.py`](https://github.com/pylint-dev/pylint-django/blob/55cb670049b1d2d2219ea0968ef55f1e914e055d/test/test_func.py) had ```python if __name__=='__main__': testlib.unittest_main(defaultTest='suite') ``` Commit https://github.com/pylint-dev/pylint-django/commit/38f2cf2e7f0909f17b6a0d67a37b89c2ffc678b0 (PR pylint-dev/pylint-django#417) removed ```python if __name__ == "__main__": sys.exit(pytest.main(sys.argv)) ``` The tests on...
Django 4.2 introduces support for psycopg 3, but when using psycopg 3 Ranges without psycopg2 install, pyling-django raises an AstroidImportError due to `apply_type_shim` checking for `psycopg2._range`. Django 4.2 also now...
Django querysets can be used in a python boolean expression (ie: `bool(qs)` or `if qs:`), however in many cases this is considered a bad practice in django since the [`__bool__`](https://github.com/django/django/blob/798e38c2b9c46ab72e2ee8c33dc822f01b194b1e/django/db/models/query.py#L411-L413)...
### Bug description ```python Seems to be a regression/repeat of https://github.com/pylint-dev/pylint/issues/7938 with pylint 3.x Works fine with 2.15.9, 2.17.7. Fails with ModuleNotFound error with 3.0.2. ``` ### Configuration _No response_...
I updated my development environment to the latest version of pylint-django (2.5.5) and started getting this error when trying to run pylint tests: ``` Traceback (most recent call last): File...
Why do pypi (https://pypi.org/project/pylint-django/2.5.5/) and cookiecutter-django (https://github.com/cookiecutter/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/requirements/local.txt) refer to version 2.5.5 when the releases page in this repo (https://github.com/pylint-dev/pylint-django/releases) only mentions 2.5.4?
Hi, If I upgrade PyLint to 2.15.x, I can't load the pylint_django plugin anymore. It raise pylint_plugin_utils.NoSuchChecker: Can you reproduce this problem too ? I'm on Windows 11 (sorry ^_^)...
django-simple-hisory is a fairly popular [1] package for keeping track of changes in django objects. Setting the `_change_reason` property of an object is the officially documented way to provide a...
I found this while trying to help with https://github.com/microsoft/vscode-pylint/issues/454 and the output/error can be found there, I'm making this ticket as a good faith effort to help issues get fixed,...