From d794fb2c89ab35958bd07434961ccede2edd9cb8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:03:00 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pylint_django/__init__.py | 1 - pylint_django/__pkginfo__.py | 1 + pylint_django/augmentations/__init__.py | 1 + pylint_django/checkers/__init__.py | 1 + pylint_django/checkers/forms.py | 1 + pylint_django/checkers/models.py | 1 + pylint_django/plugin.py | 1 + pylint_django/tests/input/external_drf_noerror_serializer.py | 1 + pylint_django/tests/input/external_factory_boy_noerror.py | 1 + .../tests/input/external_psycopg2_noerror_postgres_fields.py | 1 + .../tests/input/external_tastypie_noerror_foreign_key.py | 1 + .../tests/input/func_model_does_not_use_unicode_py33.py | 1 + .../tests/input/func_model_no_explicit_unicode_str_compat.py | 1 + pylint_django/tests/input/func_modelform_exclude.py | 1 + pylint_django/tests/input/func_noerror_classviews.py | 1 + .../tests/input/func_noerror_duplicate_except_doesnotexist.py | 1 + .../tests/input/func_noerror_factory_post_generation.py | 1 + pylint_django/tests/input/func_noerror_foreign_key_attributes.py | 1 + pylint_django/tests/input/func_noerror_foreign_key_ids.py | 1 + .../tests/input/func_noerror_foreign_key_key_cls_unbound.py | 1 + pylint_django/tests/input/func_noerror_foreign_key_package.py | 1 + pylint_django/tests/input/func_noerror_foreign_key_sets.py | 1 + pylint_django/tests/input/func_noerror_foreignkeys.py | 1 + pylint_django/tests/input/func_noerror_form_fields.py | 1 + pylint_django/tests/input/func_noerror_forms_py33.py | 1 + pylint_django/tests/input/func_noerror_formview_ancestors.py | 1 + pylint_django/tests/input/func_noerror_generic_foreign_key.py | 1 + pylint_django/tests/input/func_noerror_gettext_lazy_format.py | 1 + pylint_django/tests/input/func_noerror_ignore_meta_subclass.py | 1 + pylint_django/tests/input/func_noerror_import_q.py | 1 + pylint_django/tests/input/func_noerror_issue_46.py | 1 + pylint_django/tests/input/func_noerror_manytomanyfield.py | 1 + pylint_django/tests/input/func_noerror_model_fields.py | 1 + pylint_django/tests/input/func_noerror_model_methods.py | 1 + pylint_django/tests/input/func_noerror_model_unicode_callable.py | 1 + pylint_django/tests/input/func_noerror_model_unicode_lambda.py | 1 + pylint_django/tests/input/func_noerror_models_py33.py | 1 + pylint_django/tests/input/func_noerror_protected_meta_access.py | 1 + pylint_django/tests/input/func_noerror_string_foreignkey.py | 1 + pylint_django/tests/input/func_noerror_ugettext_lazy_format.py | 1 + pylint_django/tests/input/func_noerror_unicode_py2_compatible.py | 1 + pylint_django/tests/input/func_noerror_urls.py | 1 + pylint_django/tests/input/func_noerror_uuid_field.py | 1 + pylint_django/tests/input/func_noerror_views.py | 1 + pylint_django/tests/input/func_unused_arguments.py | 1 + pylint_django/tests/input/migrations/0001_noerror_initial.py | 1 + pylint_django/tests/input/migrations/0002_new_column.py | 1 + .../func_noerror_foreign_key_key_cls_unbound_in_same_package.py | 1 + pylint_django/transforms/__init__.py | 1 + pylint_django/utils.py | 1 + 50 files changed, 49 insertions(+), 1 deletion(-) diff --git a/pylint_django/__init__.py b/pylint_django/__init__.py index c3028de4..27575371 100644 --- a/pylint_django/__init__.py +++ b/pylint_django/__init__.py @@ -1,6 +1,5 @@ """pylint_django module.""" - from pylint_django import plugin register = plugin.register # pylint: disable=invalid-name diff --git a/pylint_django/__pkginfo__.py b/pylint_django/__pkginfo__.py index a6d71329..ebcf236c 100644 --- a/pylint_django/__pkginfo__.py +++ b/pylint_django/__pkginfo__.py @@ -1,2 +1,3 @@ """pkginfo.""" + BASE_ID = 51 diff --git a/pylint_django/augmentations/__init__.py b/pylint_django/augmentations/__init__.py index 89f454f4..fcb19b35 100644 --- a/pylint_django/augmentations/__init__.py +++ b/pylint_django/augmentations/__init__.py @@ -1,4 +1,5 @@ """Augmentations.""" + # pylint: disable=invalid-name import functools import itertools diff --git a/pylint_django/checkers/__init__.py b/pylint_django/checkers/__init__.py index 1a14b746..c1e12fa9 100644 --- a/pylint_django/checkers/__init__.py +++ b/pylint_django/checkers/__init__.py @@ -1,4 +1,5 @@ """Checkers.""" + from pylint_django.checkers.auth_user import AuthUserChecker from pylint_django.checkers.django_installed import DjangoInstalledChecker from pylint_django.checkers.foreign_key_strings import ForeignKeyStringsChecker diff --git a/pylint_django/checkers/forms.py b/pylint_django/checkers/forms.py index f668684c..dd490de0 100644 --- a/pylint_django/checkers/forms.py +++ b/pylint_django/checkers/forms.py @@ -1,4 +1,5 @@ """Models.""" + from astroid.nodes import Assign, AssignName, ClassDef from pylint.checkers import BaseChecker diff --git a/pylint_django/checkers/models.py b/pylint_django/checkers/models.py index 5bc25c67..ce953506 100644 --- a/pylint_django/checkers/models.py +++ b/pylint_django/checkers/models.py @@ -1,4 +1,5 @@ """Models.""" + from astroid import Const from astroid.nodes import Assign, AssignName, ClassDef, FunctionDef from pylint.checkers import BaseChecker diff --git a/pylint_django/plugin.py b/pylint_django/plugin.py index 254bd0c9..dd4b68e2 100644 --- a/pylint_django/plugin.py +++ b/pylint_django/plugin.py @@ -1,4 +1,5 @@ """Common Django module.""" + # we want to import the transforms to make sure they get added to the astroid manager, # however we don't actually access them directly, so we'll disable the warning from pylint_django import compat diff --git a/pylint_django/tests/input/external_drf_noerror_serializer.py b/pylint_django/tests/input/external_drf_noerror_serializer.py index 9620541e..c521b01b 100644 --- a/pylint_django/tests/input/external_drf_noerror_serializer.py +++ b/pylint_django/tests/input/external_drf_noerror_serializer.py @@ -1,6 +1,7 @@ """ Checks that Pylint does not complain about DRF serializers """ + # pylint: disable=C0111,W5101,use-symbolic-message-instead from rest_framework import serializers diff --git a/pylint_django/tests/input/external_factory_boy_noerror.py b/pylint_django/tests/input/external_factory_boy_noerror.py index 9f6152d3..394a656b 100644 --- a/pylint_django/tests/input/external_factory_boy_noerror.py +++ b/pylint_django/tests/input/external_factory_boy_noerror.py @@ -2,6 +2,7 @@ Test to validate that pylint_django doesn't produce Instance of 'SubFactory' has no 'pk' member (no-member) warnings """ + # pylint: disable=attribute-defined-outside-init, missing-docstring, too-few-public-methods import factory from django import test diff --git a/pylint_django/tests/input/external_psycopg2_noerror_postgres_fields.py b/pylint_django/tests/input/external_psycopg2_noerror_postgres_fields.py index 043126b0..3477c386 100644 --- a/pylint_django/tests/input/external_psycopg2_noerror_postgres_fields.py +++ b/pylint_django/tests/input/external_psycopg2_noerror_postgres_fields.py @@ -1,6 +1,7 @@ """ Checks that Pylint does not complain Postgres model fields. """ + # pylint: disable=C0111,W5101 from __future__ import print_function diff --git a/pylint_django/tests/input/external_tastypie_noerror_foreign_key.py b/pylint_django/tests/input/external_tastypie_noerror_foreign_key.py index 68413e9a..cb1a632b 100644 --- a/pylint_django/tests/input/external_tastypie_noerror_foreign_key.py +++ b/pylint_django/tests/input/external_tastypie_noerror_foreign_key.py @@ -9,6 +9,7 @@ The issue is the lint trys resolving the `ForeignKey` for the tastypie `ForeignKey` which cause import error. """ + from tastypie import fields from tastypie.fields import ForeignKey diff --git a/pylint_django/tests/input/func_model_does_not_use_unicode_py33.py b/pylint_django/tests/input/func_model_does_not_use_unicode_py33.py index b6fa7e1a..faa57ac8 100644 --- a/pylint_django/tests/input/func_model_does_not_use_unicode_py33.py +++ b/pylint_django/tests/input/func_model_does_not_use_unicode_py33.py @@ -1,6 +1,7 @@ """ Ensures that under PY3 django models with a __unicode__ method are flagged """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_model_no_explicit_unicode_str_compat.py b/pylint_django/tests/input/func_model_no_explicit_unicode_str_compat.py index d111218d..1e4ccad6 100644 --- a/pylint_django/tests/input/func_model_no_explicit_unicode_str_compat.py +++ b/pylint_django/tests/input/func_model_no_explicit_unicode_str_compat.py @@ -3,6 +3,7 @@ python_2_unicode_compatible decorator applied are flagged correctly as not having explicitly defined __unicode__ """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_modelform_exclude.py b/pylint_django/tests/input/func_modelform_exclude.py index 432ee0dc..1274aa94 100644 --- a/pylint_django/tests/input/func_modelform_exclude.py +++ b/pylint_django/tests/input/func_modelform_exclude.py @@ -1,6 +1,7 @@ """ Checks that Pylint complains about ModelForm using exclude """ + # pylint: disable=missing-docstring from django import forms diff --git a/pylint_django/tests/input/func_noerror_classviews.py b/pylint_django/tests/input/func_noerror_classviews.py index e9a8ea25..d478642f 100644 --- a/pylint_django/tests/input/func_noerror_classviews.py +++ b/pylint_django/tests/input/func_noerror_classviews.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about attributes and methods when using Class-based Views """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_noerror_duplicate_except_doesnotexist.py b/pylint_django/tests/input/func_noerror_duplicate_except_doesnotexist.py index 8f020014..b59c7c21 100644 --- a/pylint_django/tests/input/func_noerror_duplicate_except_doesnotexist.py +++ b/pylint_django/tests/input/func_noerror_duplicate_except_doesnotexist.py @@ -3,6 +3,7 @@ except blocks catching DoesNotExist exceptions: https://github.com/PyCQA/pylint-django/issues/81 """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_noerror_factory_post_generation.py b/pylint_django/tests/input/func_noerror_factory_post_generation.py index a42faeca..f61c7f96 100644 --- a/pylint_django/tests/input/func_noerror_factory_post_generation.py +++ b/pylint_django/tests/input/func_noerror_factory_post_generation.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about no self argument in factory.post_generation method. """ + # pylint: disable=missing-docstring,too-few-public-methods,unused-argument,no-member import factory diff --git a/pylint_django/tests/input/func_noerror_foreign_key_attributes.py b/pylint_django/tests/input/func_noerror_foreign_key_attributes.py index 8c20b4fc..411c2cd2 100644 --- a/pylint_django/tests/input/func_noerror_foreign_key_attributes.py +++ b/pylint_django/tests/input/func_noerror_foreign_key_attributes.py @@ -1,6 +1,7 @@ """ Checks that Pylint does not complain about foreign key sets on models """ + # pylint: disable=missing-docstring consider-using-f-string from django.db import models diff --git a/pylint_django/tests/input/func_noerror_foreign_key_ids.py b/pylint_django/tests/input/func_noerror_foreign_key_ids.py index 90370735..9cd1b0a8 100644 --- a/pylint_django/tests/input/func_noerror_foreign_key_ids.py +++ b/pylint_django/tests/input/func_noerror_foreign_key_ids.py @@ -1,6 +1,7 @@ """ Checks that Pylint does not complain about foreign key id access """ + # pylint: disable=missing-docstring,wrong-import-position from django.db import models diff --git a/pylint_django/tests/input/func_noerror_foreign_key_key_cls_unbound.py b/pylint_django/tests/input/func_noerror_foreign_key_key_cls_unbound.py index d4479b5d..684c3867 100644 --- a/pylint_django/tests/input/func_noerror_foreign_key_key_cls_unbound.py +++ b/pylint_django/tests/input/func_noerror_foreign_key_key_cls_unbound.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about ForeignKey pointing to model in module of models package """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_noerror_foreign_key_package.py b/pylint_django/tests/input/func_noerror_foreign_key_package.py index 02774b12..ccc30cb7 100644 --- a/pylint_django/tests/input/func_noerror_foreign_key_package.py +++ b/pylint_django/tests/input/func_noerror_foreign_key_package.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about ForeignKey pointing to model in module of models package """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_noerror_foreign_key_sets.py b/pylint_django/tests/input/func_noerror_foreign_key_sets.py index 37e69090..826eb71e 100644 --- a/pylint_django/tests/input/func_noerror_foreign_key_sets.py +++ b/pylint_django/tests/input/func_noerror_foreign_key_sets.py @@ -1,6 +1,7 @@ """ Checks that Pylint does not complain about foreign key sets on models """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_noerror_foreignkeys.py b/pylint_django/tests/input/func_noerror_foreignkeys.py index e9cb5e81..d5defb13 100644 --- a/pylint_django/tests/input/func_noerror_foreignkeys.py +++ b/pylint_django/tests/input/func_noerror_foreignkeys.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about various methods on Django model fields. """ + # pylint: disable=missing-docstring,wrong-import-position from django.db import models from django.db.models import ForeignKey, OneToOneField diff --git a/pylint_django/tests/input/func_noerror_form_fields.py b/pylint_django/tests/input/func_noerror_form_fields.py index dada077b..3cd260f5 100644 --- a/pylint_django/tests/input/func_noerror_form_fields.py +++ b/pylint_django/tests/input/func_noerror_form_fields.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about various methods on Django form forms. """ + # pylint: disable=missing-docstring from __future__ import print_function diff --git a/pylint_django/tests/input/func_noerror_forms_py33.py b/pylint_django/tests/input/func_noerror_forms_py33.py index 831f161d..764a55a5 100644 --- a/pylint_django/tests/input/func_noerror_forms_py33.py +++ b/pylint_django/tests/input/func_noerror_forms_py33.py @@ -1,6 +1,7 @@ """ Checks that Pylint does not complain about django Forms """ + # pylint: disable=missing-docstring,wrong-import-position from django import forms diff --git a/pylint_django/tests/input/func_noerror_formview_ancestors.py b/pylint_django/tests/input/func_noerror_formview_ancestors.py index 35f72c9c..efed6268 100644 --- a/pylint_django/tests/input/func_noerror_formview_ancestors.py +++ b/pylint_django/tests/input/func_noerror_formview_ancestors.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about django FormViews having too many ancestors """ + # pylint: disable=missing-docstring from django.views.generic import FormView diff --git a/pylint_django/tests/input/func_noerror_generic_foreign_key.py b/pylint_django/tests/input/func_noerror_generic_foreign_key.py index 8cfe73b3..22de9585 100644 --- a/pylint_django/tests/input/func_noerror_generic_foreign_key.py +++ b/pylint_django/tests/input/func_noerror_generic_foreign_key.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about GenericForeignKey fields: https://github.com/PyCQA/pylint-django/issues/230 """ + # pylint: disable=missing-docstring from django.contrib.contenttypes.fields import GenericForeignKey diff --git a/pylint_django/tests/input/func_noerror_gettext_lazy_format.py b/pylint_django/tests/input/func_noerror_gettext_lazy_format.py index d331c4d5..1fa664af 100644 --- a/pylint_django/tests/input/func_noerror_gettext_lazy_format.py +++ b/pylint_django/tests/input/func_noerror_gettext_lazy_format.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about django lazy proxy when using gettext_lazy """ + from django.utils.translation import gettext_lazy gettext_lazy("{something}").format(something="lala") diff --git a/pylint_django/tests/input/func_noerror_ignore_meta_subclass.py b/pylint_django/tests/input/func_noerror_ignore_meta_subclass.py index 50a84f1d..aa44d8b6 100644 --- a/pylint_django/tests/input/func_noerror_ignore_meta_subclass.py +++ b/pylint_django/tests/input/func_noerror_ignore_meta_subclass.py @@ -2,6 +2,7 @@ This test ensures that a 'Meta' class defined on a Django model does not raise warnings such as 'old-style-class' and 'too-few-public-methods' """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_noerror_import_q.py b/pylint_django/tests/input/func_noerror_import_q.py index 6f122559..d01e6ce5 100644 --- a/pylint_django/tests/input/func_noerror_import_q.py +++ b/pylint_django/tests/input/func_noerror_import_q.py @@ -1,5 +1,6 @@ """ Checks that Pylint does not complain about import of Q. """ + # pylint: disable=missing-docstring,unused-import from django.db.models import Q # noqa: F401 diff --git a/pylint_django/tests/input/func_noerror_issue_46.py b/pylint_django/tests/input/func_noerror_issue_46.py index 8bd2e181..c34d3cf8 100644 --- a/pylint_django/tests/input/func_noerror_issue_46.py +++ b/pylint_django/tests/input/func_noerror_issue_46.py @@ -1,6 +1,7 @@ """ Checks that Pylint does not complain about raising DoesNotExist """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_noerror_manytomanyfield.py b/pylint_django/tests/input/func_noerror_manytomanyfield.py index 8d6c2592..29f41629 100644 --- a/pylint_django/tests/input/func_noerror_manytomanyfield.py +++ b/pylint_django/tests/input/func_noerror_manytomanyfield.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about various methods on many-to-many relationships """ + from django.contrib.auth.models import AbstractUser, Permission # pylint: disable=missing-docstring diff --git a/pylint_django/tests/input/func_noerror_model_fields.py b/pylint_django/tests/input/func_noerror_model_fields.py index c0389ff7..8cd29b05 100644 --- a/pylint_django/tests/input/func_noerror_model_fields.py +++ b/pylint_django/tests/input/func_noerror_model_fields.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about various methods on Django model fields. """ + # pylint: disable=missing-docstring from __future__ import print_function diff --git a/pylint_django/tests/input/func_noerror_model_methods.py b/pylint_django/tests/input/func_noerror_model_methods.py index dc8efd62..5813de29 100644 --- a/pylint_django/tests/input/func_noerror_model_methods.py +++ b/pylint_django/tests/input/func_noerror_model_methods.py @@ -1,6 +1,7 @@ """ Checks that Pylint does not complain about using Model and Manager methods """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_noerror_model_unicode_callable.py b/pylint_django/tests/input/func_noerror_model_unicode_callable.py index a963ee0e..a2d24d97 100644 --- a/pylint_django/tests/input/func_noerror_model_unicode_callable.py +++ b/pylint_django/tests/input/func_noerror_model_unicode_callable.py @@ -1,6 +1,7 @@ """ Ensures that django models without a __unicode__ method are flagged """ + # pylint: disable=missing-docstring,wrong-import-position from django.db import models diff --git a/pylint_django/tests/input/func_noerror_model_unicode_lambda.py b/pylint_django/tests/input/func_noerror_model_unicode_lambda.py index a1db11b4..ba85056a 100644 --- a/pylint_django/tests/input/func_noerror_model_unicode_lambda.py +++ b/pylint_django/tests/input/func_noerror_model_unicode_lambda.py @@ -1,6 +1,7 @@ """ Ensures that django models without a __unicode__ method are flagged """ + # pylint: disable=missing-docstring,wrong-import-position,unnecessary-lambda-assignment from django.db import models diff --git a/pylint_django/tests/input/func_noerror_models_py33.py b/pylint_django/tests/input/func_noerror_models_py33.py index 5eca5070..ff6f91cb 100644 --- a/pylint_django/tests/input/func_noerror_models_py33.py +++ b/pylint_django/tests/input/func_noerror_models_py33.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about a fairly standard Django Model """ + # pylint: disable=missing-docstring from django.db import models diff --git a/pylint_django/tests/input/func_noerror_protected_meta_access.py b/pylint_django/tests/input/func_noerror_protected_meta_access.py index 96e09adc..8f41d615 100644 --- a/pylint_django/tests/input/func_noerror_protected_meta_access.py +++ b/pylint_django/tests/input/func_noerror_protected_meta_access.py @@ -5,6 +5,7 @@ (see https://github.com/PyCQA/pylint-django/issues/66, and https://docs.djangoproject.com/en/1.9/ref/models/meta/) """ + # pylint: disable=missing-docstring from __future__ import print_function diff --git a/pylint_django/tests/input/func_noerror_string_foreignkey.py b/pylint_django/tests/input/func_noerror_string_foreignkey.py index 8f9a730e..9456ce86 100644 --- a/pylint_django/tests/input/func_noerror_string_foreignkey.py +++ b/pylint_django/tests/input/func_noerror_string_foreignkey.py @@ -2,6 +2,7 @@ Checks that PyLint correctly handles string foreign keys https://github.com/PyCQA/pylint-django/issues/243 """ + # pylint: disable=missing-docstring, hard-coded-auth-user from django.db import models diff --git a/pylint_django/tests/input/func_noerror_ugettext_lazy_format.py b/pylint_django/tests/input/func_noerror_ugettext_lazy_format.py index 35b14701..a84f5b7e 100644 --- a/pylint_django/tests/input/func_noerror_ugettext_lazy_format.py +++ b/pylint_django/tests/input/func_noerror_ugettext_lazy_format.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about django lazy proxy when using ugettext_lazy """ + from django.utils.translation import ugettext_lazy ugettext_lazy("{something}").format(something="lala") diff --git a/pylint_django/tests/input/func_noerror_unicode_py2_compatible.py b/pylint_django/tests/input/func_noerror_unicode_py2_compatible.py index dace2270..84e8e63c 100644 --- a/pylint_django/tests/input/func_noerror_unicode_py2_compatible.py +++ b/pylint_django/tests/input/func_noerror_unicode_py2_compatible.py @@ -4,6 +4,7 @@ See https://github.com/PyCQA/pylint-django/issues/10 """ + from django.db import models # pylint: disable=missing-docstring diff --git a/pylint_django/tests/input/func_noerror_urls.py b/pylint_django/tests/input/func_noerror_urls.py index 40a5d3ed..22eb8035 100644 --- a/pylint_django/tests/input/func_noerror_urls.py +++ b/pylint_django/tests/input/func_noerror_urls.py @@ -2,6 +2,7 @@ Checks that Pylint does not complain about attributes and methods when creating a typical urls.py """ + # pylint: disable=missing-docstring try: diff --git a/pylint_django/tests/input/func_noerror_uuid_field.py b/pylint_django/tests/input/func_noerror_uuid_field.py index 0d38dfc9..0a2b4bc7 100644 --- a/pylint_django/tests/input/func_noerror_uuid_field.py +++ b/pylint_django/tests/input/func_noerror_uuid_field.py @@ -1,6 +1,7 @@ """ Checks that Pylint does not complain about UUID fields. """ + # pylint: disable=missing-class-docstring,missing-function-docstring from __future__ import print_function diff --git a/pylint_django/tests/input/func_noerror_views.py b/pylint_django/tests/input/func_noerror_views.py index 0fe8ab80..ea32c556 100644 --- a/pylint_django/tests/input/func_noerror_views.py +++ b/pylint_django/tests/input/func_noerror_views.py @@ -1,6 +1,7 @@ """ Checks that Pylint does not complain when using function based views. """ + # pylint: disable=missing-docstring diff --git a/pylint_django/tests/input/func_unused_arguments.py b/pylint_django/tests/input/func_unused_arguments.py index f7e40b9e..338f9c31 100644 --- a/pylint_django/tests/input/func_unused_arguments.py +++ b/pylint_django/tests/input/func_unused_arguments.py @@ -2,6 +2,7 @@ Checks that Pylint still complains about unused-arguments for other arguments if a function/method contains an argument named `request`. """ + # pylint: disable=missing-docstring from django.http import JsonResponse diff --git a/pylint_django/tests/input/migrations/0001_noerror_initial.py b/pylint_django/tests/input/migrations/0001_noerror_initial.py index 41186766..da690479 100644 --- a/pylint_django/tests/input/migrations/0001_noerror_initial.py +++ b/pylint_django/tests/input/migrations/0001_noerror_initial.py @@ -1,6 +1,7 @@ """ Initial migration which should not raise any pylint warnings. """ + # pylint: disable=missing-docstring, invalid-name from django.db import migrations, models diff --git a/pylint_django/tests/input/migrations/0002_new_column.py b/pylint_django/tests/input/migrations/0002_new_column.py index 07ebc2d6..8cff3fb9 100644 --- a/pylint_django/tests/input/migrations/0002_new_column.py +++ b/pylint_django/tests/input/migrations/0002_new_column.py @@ -12,6 +12,7 @@ > For this reason, it’s recommended you always create new columns with > null=True, as this way they will be added immediately. """ + # pylint: disable=missing-docstring, invalid-name from datetime import timedelta diff --git a/pylint_django/tests/input/models/func_noerror_foreign_key_key_cls_unbound_in_same_package.py b/pylint_django/tests/input/models/func_noerror_foreign_key_key_cls_unbound_in_same_package.py index d25da4ad..b042a20a 100644 --- a/pylint_django/tests/input/models/func_noerror_foreign_key_key_cls_unbound_in_same_package.py +++ b/pylint_django/tests/input/models/func_noerror_foreign_key_key_cls_unbound_in_same_package.py @@ -10,6 +10,7 @@ 'id' attribute. Also see: https://github.com/PyCQA/pylint-django/issues/232#issuecomment-495242695 """ + # pylint: disable=missing-docstring, no-member from django.db import models diff --git a/pylint_django/transforms/__init__.py b/pylint_django/transforms/__init__.py index 11c56715..e99a6fe2 100644 --- a/pylint_django/transforms/__init__.py +++ b/pylint_django/transforms/__init__.py @@ -8,6 +8,7 @@ For example, the ForeignKeyStringsChecker loads the foreignkey.py transforms itself as it may be disabled independently of the rest of pylint-django """ + import os import re diff --git a/pylint_django/utils.py b/pylint_django/utils.py index 205e3b3f..169e0879 100644 --- a/pylint_django/utils.py +++ b/pylint_django/utils.py @@ -1,4 +1,5 @@ """Utils.""" + import sys import astroid