diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 22dea9cc..de9360f3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -465,58 +465,58 @@ Version 0.7.4 - `#88 `__ Fixed builds with Django 1.10 (thanks to `federicobond `__) -- `#91 `__ Fixed race +- `#91 `__ Fixed race condition when running with pylint parallel execution mode (thanks to `jeremycarroll `__) -- `#64 `__ "Meta is +- `#64 `__ "Meta is old style class" now suppressed on BaseSerializer too (thanks to `unklphil `__) -- `#70 `__ Updating to +- `#70 `__ Updating to handle newer pylint/astroid versions (thanks to `iXce `__) Version 0.7.2 ------------- -- `#76 `__ Better +- `#76 `__ Better handling of mongoengine querysetmanager -- `#73 `__ - `#72 `__ Make package +- `#73 `__ + `#72 `__ Make package zip safe to help fix some path problems -- `#68 `__ Suppressed +- `#68 `__ Suppressed invalid constant warning for "app\_name" in urls.py -- `#67 `__ Fix +- `#67 `__ Fix view.args and view.kwargs -- `#66 `__ accessing +- `#66 `__ accessing \_meta no longer causes a protected-access warning as this is a public API as of Django 1.8 -- `#65 `__ Add support +- `#65 `__ Add support of mongoengine module. -- `#59 `__ Silence +- `#59 `__ Silence old-style-class for widget Meta Version 0.7.1 ------------- -- `#52 `__ - Fixed +- `#52 `__ - Fixed stupid mistake when using versioninfo Version 0.7 ----------- -- `#51 `__ - Fixed +- `#51 `__ - Fixed compatibility with pylint 1.5 / astroid 1.4.1 Version 0.6.1 ------------- -- `#43 `__ - Foreign +- `#43 `__ - Foreign key ID access (``somefk_id``) does not raise an 'attribute not found' warning -- `#31 `__ - Support +- `#31 `__ - Support for custom model managers (thanks `smirolo `__) -- `#48 `__ - Added +- `#48 `__ - Added support for django-restframework (thanks `mbertolacci `__) @@ -526,25 +526,25 @@ Version 0.6 - Pylint 1.4 dropped support for Python 2.6, therefore a constraint is added that pylint-django will only work with Python2.6 if pylint<=1.3 is installed -- `#40 `__ - pylint +- `#40 `__ - pylint 1.4 warned about View and Model classes not having enough public methods; this is suppressed -- `#37 `__ - fixed an +- `#37 `__ - fixed an infinite loop when using astroid 1.3.3+ -- `#36 `__ - no +- `#36 `__ - no longer warning about lack of ``__unicode__`` method on abstract model classes -- `PR #34 `__ - prevent +- `PR #34 `__ - prevent warning about use of ``super()`` on ModelManager classes Version 0.5.5 ------------- -- `PR #27 `__ - better +- `PR #27 `__ - better ``ForeignKey`` transforms, which now work when of the form ``othermodule.ModelClass``. This also fixes a problem where an inferred type would be ``_Yes`` and pylint would fail -- `PR #28 `__ - better +- `PR #28 `__ - better knowledge of ``ManyToManyField`` classes Version 0.5.4 @@ -556,7 +556,7 @@ Version 0.5.4 Version 0.5.3 ------------- -- `Issue #25 `__ +- `Issue #25 `__ Fixing cases where a module defines ``get`` as a method Version 0.5.2 @@ -574,20 +574,20 @@ Version 0.5.1 Version 0.5 ----------- -- `Issue #7 `__ +- `Issue #7 `__ Improved handling of Django model fields -- `Issue #10 `__ No +- `Issue #10 `__ No warning about missing **unicode** if the Django python3/2 compatibility tools are used -- `Issue #11 `__ +- `Issue #11 `__ Improved handling of Django form fields -- `Issue #12 `__ +- `Issue #12 `__ Improved handling of Django ImageField and FileField objects -- `Issue #14 `__ +- `Issue #14 `__ Models which do not define **unicode** but whose parents do now have a new error (W5103) instead of incorrectly warning about no **unicode** being present. -- `Issue #21 `__ +- `Issue #21 `__ ``ForeignKey`` and ``OneToOneField`` fields on models are replaced with instance of the type they refer to in the AST, which allows pylint to generate correct warnings about attributes they may or may @@ -605,9 +605,9 @@ Version 0.2 - Pylint now recognises ``BaseForm`` as an ancestor of ``Form`` and subclasses - Improved ``Form`` support -- `Issue #2 `__ - a +- `Issue #2 `__ - a subclass of a ``Model`` or ``Form`` also has warnings about a ``Meta`` class suppressed. -- `Issue #3 `__ - +- `Issue #3 `__ - ``Form`` and ``ModelForm`` subclasses no longer warn about ``Meta`` classes. diff --git a/pylint_django/augmentations/__init__.py b/pylint_django/augmentations/__init__.py index db259647..1ff4c419 100644 --- a/pylint_django/augmentations/__init__.py +++ b/pylint_django/augmentations/__init__.py @@ -325,7 +325,7 @@ def ignore_import_warnings_for_related_fields(orig_method, self, node): new_things[name] = stmts # ScopeConsumer changed between pylint 2.12 and 2.13 - # see https://github.com/PyCQA/pylint/issues/5970#issuecomment-1078778393 + # see https://github.com/pylint-dev/pylint/issues/5970#issuecomment-1078778393 if hasattr(consumer, "consumed_uncertain"): # this is pylint >= 2.13, and the ScopeConsumer tuple has an additional field sc_args = (new_things, consumer.consumed, consumer.consumed_uncertain, consumer.scope_type) diff --git a/pylint_django/checkers/foreign_key_strings.py b/pylint_django/checkers/foreign_key_strings.py index f232f5d9..bb61b728 100644 --- a/pylint_django/checkers/foreign_key_strings.py +++ b/pylint_django/checkers/foreign_key_strings.py @@ -62,7 +62,7 @@ def open(self): # Django is configured explicitly, and will use some basic defaults in that # case. However, as this is a WARNING not a FATAL, the error must be raised # with an AST node - only F and R messages are scope exempt (see - # https://github.com/PyCQA/pylint/blob/master/pylint/constants.py#L24) + # https://github.com/pylint-dev/pylint/blob/master/pylint/constants.py#L24) # However, testing to see if Django is configured happens in `open()` # before any modules are inspected, as Django needs to be configured with diff --git a/pylint_django/checkers/json_response.py b/pylint_django/checkers/json_response.py index 4d15f547..904fd71a 100644 --- a/pylint_django/checkers/json_response.py +++ b/pylint_django/checkers/json_response.py @@ -1,7 +1,7 @@ # Copyright (c) 2018 Alexander Todorov # Licensed under the GPL 2.0: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html -# For details: https://github.com/PyCQA/pylint-django/blob/master/LICENSE +# For details: https://github.com/pylint-dev/pylint-django/blob/master/LICENSE """ Various suggestions about JSON http responses """ diff --git a/pylint_django/checkers/migrations.py b/pylint_django/checkers/migrations.py index f4addfb2..c811a6aa 100644 --- a/pylint_django/checkers/migrations.py +++ b/pylint_django/checkers/migrations.py @@ -2,7 +2,7 @@ # Copyright (c) 2020 Bryan Mutai # Licensed under the GPL 2.0: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html -# For details: https://github.com/PyCQA/pylint-django/blob/master/LICENSE +# For details: https://github.com/pylint-dev/pylint-django/blob/master/LICENSE """ Various suggestions around migrations. Disabled by default! Enable with pylint --load-plugins=pylint_django.checkers.migrations diff --git a/pylint_django/checkers/models.py b/pylint_django/checkers/models.py index ce953506..76a6b9ff 100644 --- a/pylint_django/checkers/models.py +++ b/pylint_django/checkers/models.py @@ -124,7 +124,7 @@ def visit_classdef(self, node): return # if the Django compatibility decorator is used then we don't emit a warning - # see https://github.com/PyCQA/pylint-django/issues/10 + # see https://github.com/pylint-dev/pylint-django/issues/10 if _has_python_2_unicode_compatible_decorator(node): return diff --git a/pylint_django/tests/input/func_noerror_string_foreignkey.py b/pylint_django/tests/input/func_noerror_string_foreignkey.py index 8f9a730e..6f09158f 100644 --- a/pylint_django/tests/input/func_noerror_string_foreignkey.py +++ b/pylint_django/tests/input/func_noerror_string_foreignkey.py @@ -1,6 +1,6 @@ """ Checks that PyLint correctly handles string foreign keys -https://github.com/PyCQA/pylint-django/issues/243 +https://github.com/pylint-dev/pylint-django/issues/243 """ # pylint: disable=missing-docstring, hard-coded-auth-user from django.db import 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..6955c0c4 100644 --- a/pylint_django/tests/input/migrations/0002_new_column.py +++ b/pylint_django/tests/input/migrations/0002_new_column.py @@ -4,7 +4,7 @@ default value on a large table leads to DB performance issues. See: -https://github.com/PyCQA/pylint-django/issues/118 and +https://github.com/pylint-dev/pylint-django/issues/118 and https://docs.djangoproject.com/en/2.0/topics/migrations/#postgresql > ... adding columns with default values will cause a full rewrite of 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..7a7a55c8 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 @@ -1,14 +1,14 @@ """ Checks that Pylint does not crash with ForeignKey string reference pointing to model in module of models package. See -https://github.com/PyCQA/pylint-django/issues/232 +https://github.com/pylint-dev/pylint-django/issues/232 Note: the no-member disable is here b/c pylint-django doesn't know how to load models.author.Author. When pylint-django tries to load models referenced by a single string it assumes they are found in the same module it is inspecting. Hence it can't find the Author class here so it tells us it doesn't have an 'id' attribute. Also see: -https://github.com/PyCQA/pylint-django/issues/232#issuecomment-495242695 +https://github.com/pylint-dev/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 2ce561d4..ac51e241 100644 --- a/pylint_django/transforms/__init__.py +++ b/pylint_django/transforms/__init__.py @@ -25,7 +25,7 @@ def fake_module_builder(): Build a fake module to use within transformations. @package_name is a parameter from the outer scope b/c according to the docs this can't receive any parameters. - http://pylint.pycqa.org/projects/astroid/en/latest/extending.html?highlight=MANAGER#module-extender-transforms + https://pylint.readthedocs.io/projects/astroid/en/latest/extending.html#module-extender-transforms """ transforms_dir = os.path.join(os.path.dirname(__file__), "transforms") transformed_name = re.sub(r"\.", "_", package_name) diff --git a/tox.ini b/tox.ini index ca10ad05..c95fec5a 100644 --- a/tox.ini +++ b/tox.ini @@ -40,8 +40,8 @@ deps = django42: Django>=4.2,<4.3 django50: Django>=5.0,<5.1 django-main: Django - django-main: git+https://github.com/pycqa/astroid@main - django-main: git+https://github.com/pycqa/pylint@main + django-main: git+https://github.com/pylint-dev/astroid@main + django-main: git+https://github.com/pylint-dev/pylint@main setenv = PIP_DISABLE_PIP_VERSION_CHECK = 1 PYTHONPATH = .