diff --git a/openedx/core/djangoapps/content_staging/tests/test_clipboard.py b/openedx/core/djangoapps/content_staging/tests/test_clipboard.py index 551f94e90e1a..ab65d444ed6f 100644 --- a/openedx/core/djangoapps/content_staging/tests/test_clipboard.py +++ b/openedx/core/djangoapps/content_staging/tests/test_clipboard.py @@ -1,3 +1,4 @@ +# pylint: skip-file """ Tests for the clipboard functionality """ diff --git a/pylint_django_settings.py b/pylint_django_settings.py index 46abfd81f883..6051d9ab4b56 100644 --- a/pylint_django_settings.py +++ b/pylint_django_settings.py @@ -1,5 +1,5 @@ -from pylint_django.checkers import ForeignKeyStringsChecker -from pylint_plugin_utils import get_checker +import os +import sys class ArgumentCompatibilityError(Exception): @@ -47,6 +47,4 @@ def load_configuration(linter): """ Configures the Django settings module based on the command-line arguments passed to pylint. """ - name_checker = get_checker(linter, ForeignKeyStringsChecker) - arguments = linter.cmdline_parser.parse_args()[1] - name_checker.config.django_settings_module = _get_django_settings_module(arguments) + os.environ.setdefault("DJANGO_SETTINGS_MODULE", _get_django_settings_module(sys.argv[1:])) diff --git a/pylintrc b/pylintrc index 55a9bbab3b9c..81b984a23cf8 100644 --- a/pylintrc +++ b/pylintrc @@ -64,7 +64,7 @@ # SERIOUSLY. # # ------------------------------ -# Generated by edx-lint version: 5.3.7 +# Generated by edx-lint version: 5.4.1 # ------------------------------ [MASTER] ignore = ,.git,.tox,migrations,node_modules,.pycharm_helpers @@ -72,10 +72,10 @@ persistent = yes load-plugins = edx_lint.pylint,pylint_django_settings,pylint_django,pylint_celery,pylint_pytest [MESSAGES CONTROL] -enable = +enable = blacklisted-name, line-too-long, - + abstract-class-instantiated, abstract-method, access-member-before-definition, @@ -184,26 +184,26 @@ enable = used-before-assignment, using-constant-test, yield-outside-function, - + astroid-error, fatal, method-check-failed, parse-error, raw-checker-failed, - + empty-docstring, invalid-characters-in-docstring, missing-docstring, wrong-spelling-in-comment, wrong-spelling-in-docstring, - + unused-argument, unused-import, unused-variable, - + eval-used, exec-used, - + bad-classmethod-argument, bad-mcs-classmethod-argument, bad-mcs-method-argument, @@ -234,30 +234,30 @@ enable = unneeded-not, useless-else-on-loop, wrong-assert-type, - + deprecated-method, deprecated-module, - + too-many-boolean-expressions, too-many-nested-blocks, too-many-statements, - + wildcard-import, wrong-import-order, wrong-import-position, - + missing-final-newline, mixed-line-endings, trailing-newlines, trailing-whitespace, unexpected-line-ending-format, - + bad-inline-option, bad-option-value, deprecated-pragma, unrecognized-inline-option, useless-suppression, -disable = +disable = bad-indentation, broad-exception-raised, consider-using-f-string, @@ -282,10 +282,10 @@ disable = unspecified-encoding, unused-wildcard-import, use-maxsplit-arg, - + feature-toggle-needs-doc, illegal-waffle-usage, - + logging-fstring-interpolation, import-outside-toplevel, inconsistent-return-statements, @@ -314,6 +314,18 @@ disable = c-extension-no-member, no-name-in-module, unnecessary-lambda-assignment, + too-many-positional-arguments, + possibly-used-before-assignment, + use-dict-literal, + useless-return, + superfluous-parens, + logging-not-lazy, + broad-exception-caught, + no-else-raise, + pointless-exception-statement, + consider-using-join, + use-yield-from, + used-before-assignment, [REPORTS] output-format = text @@ -356,7 +368,7 @@ ignore-imports = no ignore-mixin-members = yes ignored-classes = SQLObject unsafe-load-any-extension = yes -generated-members = +generated-members = REQUEST, acl_users, aq_parent, @@ -382,7 +394,7 @@ generated-members = [VARIABLES] init-import = no dummy-variables-rgx = _|dummy|unused|.*_unused -additional-builtins = +additional-builtins = [CLASSES] defining-attr-methods = __init__,__new__,setUp @@ -403,11 +415,11 @@ max-public-methods = 20 [IMPORTS] deprecated-modules = regsub,TERMIOS,Bastion,rexec -import-graph = -ext-import-graph = -int-import-graph = +import-graph = +ext-import-graph = +int-import-graph = [EXCEPTIONS] overgeneral-exceptions = builtins.Exception -# e624ea03d8124aa9cf2e577f830632344a0a07d9 +# 86de3cc2b03ecf7e6f6f9f2d5f790bb9e7c3eb4c diff --git a/pylintrc_tweaks b/pylintrc_tweaks index 1633da5c10a4..bfd6127880a8 100644 --- a/pylintrc_tweaks +++ b/pylintrc_tweaks @@ -33,6 +33,19 @@ disable+ = c-extension-no-member, no-name-in-module, unnecessary-lambda-assignment, + too-many-positional-arguments, + possibly-used-before-assignment, + use-dict-literal, + useless-return, + superfluous-parens, + logging-not-lazy, + broad-exception-caught, + no-else-raise, + pointless-exception-statement, + consider-using-join, + use-yield-from, + used-before-assignment, + [BASIC] attr-rgx = [a-z_][a-z0-9_]{2,40}$ diff --git a/requirements/constraints.txt b/requirements/constraints.txt index f771f12ebe62..ec078202c16a 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -149,11 +149,6 @@ path<16.12.0 # Constraint can be removed once the issue https://github.com/PyCQA/pycodestyle/issues/1090 is fixed. pycodestyle<2.9.0 -# Date: 2021-07-12 -# Issue for unpinning: https://github.com/openedx/edx-platform/issues/33560 -pylint<2.16.0 # greater version failing quality test. Fix them in seperate ticket. -astroid<2.14.0 - # Date: 2021-08-25 # At the time of writing this comment, we do not know whether py2neo>=2022 # will support our currently-deployed Neo4j version (3.5). diff --git a/requirements/edx-sandbox/base.txt b/requirements/edx-sandbox/base.txt index f474fe6bef29..821664fe9fc3 100644 --- a/requirements/edx-sandbox/base.txt +++ b/requirements/edx-sandbox/base.txt @@ -20,7 +20,7 @@ cryptography==44.0.0 # via -r requirements/edx-sandbox/base.in cycler==0.12.1 # via matplotlib -fonttools==4.55.5 +fonttools==4.55.6 # via matplotlib joblib==1.4.2 # via nltk diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index c075f9f2d40a..034f03afb0de 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -37,7 +37,7 @@ asgiref==3.8.1 # django-countries asn1crypto==1.5.1 # via snowflake-connector-python -attrs==24.3.0 +attrs==25.1.0 # via # -r requirements/edx/kernel.in # aiohttp @@ -72,13 +72,13 @@ bleach[css]==6.2.0 # xblock-poll boto==2.49.0 # via -r requirements/edx/kernel.in -boto3==1.36.5 +boto3==1.36.6 # via # -r requirements/edx/kernel.in # django-ses # fs-s3fs # ora2 -botocore==1.36.5 +botocore==1.36.6 # via # -r requirements/edx/kernel.in # boto3 @@ -1040,7 +1040,7 @@ redis==5.2.1 # via # -r requirements/edx/kernel.in # walrus -referencing==0.36.1 +referencing==0.36.2 # via # jsonschema # jsonschema-specifications diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 412b8c6147bf..5deaa2bcce64 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -82,15 +82,14 @@ asn1crypto==1.5.1 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # snowflake-connector-python -astroid==2.13.5 +astroid==3.3.8 # via - # -c requirements/edx/../constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # pylint # pylint-celery # sphinx-autoapi -attrs==24.3.0 +attrs==25.1.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -145,14 +144,14 @@ boto==2.49.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt -boto3==1.36.5 +boto3==1.36.6 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # django-ses # fs-s3fs # ora2 -botocore==1.36.5 +botocore==1.36.6 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -766,7 +765,7 @@ edx-i18n-tools==1.5.0 # -r requirements/edx/testing.txt # ora2 # xblocks-contrib -edx-lint==5.5.0 +edx-lint==5.6.0 # via -r requirements/edx/testing.txt edx-milestones==0.6.0 # via @@ -1170,11 +1169,6 @@ lazy==1.6 # lti-consumer-xblock # ora2 # xblock -lazy-object-proxy==1.10.0 - # via - # -r requirements/edx/doc.txt - # -r requirements/edx/testing.txt - # astroid libsass==0.10.0 # via # -c requirements/edx/../constraints.txt @@ -1613,9 +1607,8 @@ pylatexenc==2.10 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # olxcleaner -pylint==2.15.10 +pylint==3.3.3 # via - # -c requirements/edx/../constraints.txt # -r requirements/edx/testing.txt # edx-lint # pylint-celery @@ -1626,7 +1619,7 @@ pylint-celery==0.3 # via # -r requirements/edx/testing.txt # edx-lint -pylint-django==2.5.5 +pylint-django==2.6.1 # via # -r requirements/edx/testing.txt # edx-lint @@ -1635,7 +1628,7 @@ pylint-plugin-utils==0.8.2 # -r requirements/edx/testing.txt # pylint-celery # pylint-django -pylint-pytest==0.3.0 +pylint-pytest==1.1.8 # via -r requirements/edx/testing.txt pylti1p3==2.0.0 # via @@ -1699,7 +1692,7 @@ pysrt==1.1.2 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edxval -pytest==8.3.4 +pytest==8.2.0 # via # -r requirements/edx/testing.txt # pylint-pytest @@ -1718,7 +1711,7 @@ pytest-django==4.9.0 # via -r requirements/edx/testing.txt pytest-json-report==1.5.0 # via -r requirements/edx/testing.txt -pytest-metadata==1.8.0 +pytest-metadata==3.1.1 # via # -r requirements/edx/testing.txt # pytest-json-report @@ -1816,7 +1809,7 @@ redis==5.2.1 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # walrus -referencing==0.36.1 +referencing==0.36.2 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -2246,7 +2239,6 @@ wrapt==1.17.2 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt - # astroid xblock[django]==5.1.1 # via # -r requirements/edx/doc.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index 06436873c4cd..b54a871071b4 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -57,11 +57,9 @@ asn1crypto==1.5.1 # via # -r requirements/edx/base.txt # snowflake-connector-python -astroid==2.13.5 - # via - # -c requirements/edx/../constraints.txt - # sphinx-autoapi -attrs==24.3.0 +astroid==3.3.8 + # via sphinx-autoapi +attrs==25.1.0 # via # -r requirements/edx/base.txt # aiohttp @@ -107,13 +105,13 @@ bleach[css]==6.2.0 # xblock-poll boto==2.49.0 # via -r requirements/edx/base.txt -boto3==1.36.5 +boto3==1.36.6 # via # -r requirements/edx/base.txt # django-ses # fs-s3fs # ora2 -botocore==1.36.5 +botocore==1.36.6 # via # -r requirements/edx/base.txt # boto3 @@ -851,8 +849,6 @@ lazy==1.6 # lti-consumer-xblock # ora2 # xblock -lazy-object-proxy==1.10.0 - # via astroid loremipsum==1.0.5 # via # -r requirements/edx/base.txt @@ -1271,7 +1267,7 @@ redis==5.2.1 # via # -r requirements/edx/base.txt # walrus -referencing==0.36.1 +referencing==0.36.2 # via # -r requirements/edx/base.txt # jsonschema @@ -1576,9 +1572,7 @@ wheel==0.45.1 # -r requirements/edx/base.txt # django-pipeline wrapt==1.17.2 - # via - # -r requirements/edx/base.txt - # astroid + # via -r requirements/edx/base.txt xblock[django]==5.1.1 # via # -r requirements/edx/base.txt diff --git a/requirements/edx/semgrep.txt b/requirements/edx/semgrep.txt index e5022308aaed..9d25000148f3 100644 --- a/requirements/edx/semgrep.txt +++ b/requirements/edx/semgrep.txt @@ -4,7 +4,7 @@ # # make upgrade # -attrs==24.3.0 +attrs==25.1.0 # via # glom # jsonschema @@ -34,7 +34,7 @@ colorama==0.4.6 # via semgrep defusedxml==0.7.1 # via semgrep -deprecated==1.2.16 +deprecated==1.2.18 # via # opentelemetry-api # opentelemetry-exporter-otlp-proto-http @@ -92,13 +92,13 @@ packaging==24.2 # via semgrep peewee==3.17.8 # via semgrep -protobuf==4.25.5 +protobuf==4.25.6 # via # googleapis-common-protos # opentelemetry-proto pygments==2.19.1 # via rich -referencing==0.36.1 +referencing==0.36.2 # via # jsonschema # jsonschema-specifications diff --git a/requirements/edx/testing.in b/requirements/edx/testing.in index cf57aeb0fc46..14a0c781da82 100644 --- a/requirements/edx/testing.in +++ b/requirements/edx/testing.in @@ -37,13 +37,13 @@ pytest-attrib # Select tests based on attributes pytest-cov # pytest plugin for measuring code coverage pytest-django # Django support for pytest pytest-json-report # Output json formatted warnings after running pytest -pytest-metadata==1.8.0 # To prevent 'make upgrade' failure, dependency of pytest-json-report +pytest-metadata # To prevent 'make upgrade' failure, dependency of pytest-json-report pytest-randomly # pytest plugin to randomly order tests pytest-xdist[psutil] # Parallel execution of tests on multiple CPU cores or hosts singledispatch # Backport of functools.singledispatch from Python 3.4+, used in tests of XBlock rendering testfixtures # Provides a LogCapture utility used by several tests tox # virtualenv management for tests unidiff # Required by coverage_pytest_plugin -pylint-pytest==0.3.0 # A Pylint plugin to suppress pytest-related false positives. +pylint-pytest # A Pylint plugin to suppress pytest-related false positives. pact-python # Library for contract testing py # Needed for pytest configurations, was previously been fetched through tox diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 4fd65de9cfa6..15c73b94b0fe 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -55,12 +55,11 @@ asn1crypto==1.5.1 # via # -r requirements/edx/base.txt # snowflake-connector-python -astroid==2.13.5 +astroid==3.3.8 # via - # -c requirements/edx/../constraints.txt # pylint # pylint-celery -attrs==24.3.0 +attrs==25.1.0 # via # -r requirements/edx/base.txt # aiohttp @@ -104,13 +103,13 @@ bleach[css]==6.2.0 # xblock-poll boto==2.49.0 # via -r requirements/edx/base.txt -boto3==1.36.5 +boto3==1.36.6 # via # -r requirements/edx/base.txt # django-ses # fs-s3fs # ora2 -botocore==1.36.5 +botocore==1.36.6 # via # -r requirements/edx/base.txt # boto3 @@ -589,7 +588,7 @@ edx-i18n-tools==1.5.0 # -r requirements/edx/base.txt # ora2 # xblocks-contrib -edx-lint==5.5.0 +edx-lint==5.6.0 # via -r requirements/edx/testing.in edx-milestones==0.6.0 # via -r requirements/edx/base.txt @@ -894,8 +893,6 @@ lazy==1.6 # lti-consumer-xblock # ora2 # xblock -lazy-object-proxy==1.10.0 - # via astroid loremipsum==1.0.5 # via # -r requirements/edx/base.txt @@ -1226,9 +1223,8 @@ pylatexenc==2.10 # via # -r requirements/edx/base.txt # olxcleaner -pylint==2.15.10 +pylint==3.3.3 # via - # -c requirements/edx/../constraints.txt # edx-lint # pylint-celery # pylint-django @@ -1236,13 +1232,13 @@ pylint==2.15.10 # pylint-pytest pylint-celery==0.3 # via edx-lint -pylint-django==2.5.5 +pylint-django==2.6.1 # via edx-lint pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pylint-pytest==0.3.0 +pylint-pytest==1.1.8 # via -r requirements/edx/testing.in pylti1p3==2.0.0 # via -r requirements/edx/base.txt @@ -1287,7 +1283,7 @@ pysrt==1.1.2 # via # -r requirements/edx/base.txt # edxval -pytest==8.3.4 +pytest==8.2.0 # via # -r requirements/edx/testing.in # pylint-pytest @@ -1306,7 +1302,7 @@ pytest-django==4.9.0 # via -r requirements/edx/testing.in pytest-json-report==1.5.0 # via -r requirements/edx/testing.in -pytest-metadata==1.8.0 +pytest-metadata==3.1.1 # via # -r requirements/edx/testing.in # pytest-json-report @@ -1384,7 +1380,7 @@ redis==5.2.1 # via # -r requirements/edx/base.txt # walrus -referencing==0.36.1 +referencing==0.36.2 # via # -r requirements/edx/base.txt # jsonschema @@ -1666,9 +1662,7 @@ wheel==0.45.1 # -r requirements/edx/base.txt # django-pipeline wrapt==1.17.2 - # via - # -r requirements/edx/base.txt - # astroid + # via -r requirements/edx/base.txt xblock[django]==5.1.1 # via # -r requirements/edx/base.txt diff --git a/scripts/user_retirement/requirements/base.txt b/scripts/user_retirement/requirements/base.txt index 8f1b96239bc4..35cf225d6b1b 100644 --- a/scripts/user_retirement/requirements/base.txt +++ b/scripts/user_retirement/requirements/base.txt @@ -6,13 +6,13 @@ # asgiref==3.8.1 # via django -attrs==24.3.0 +attrs==25.1.0 # via zeep backoff==2.2.1 # via -r scripts/user_retirement/requirements/base.in -boto3==1.36.5 +boto3==1.36.6 # via -r scripts/user_retirement/requirements/base.in -botocore==1.36.5 +botocore==1.36.6 # via # boto3 # s3transfer diff --git a/scripts/user_retirement/requirements/testing.txt b/scripts/user_retirement/requirements/testing.txt index 19d54d5adb2f..4f13157aee07 100644 --- a/scripts/user_retirement/requirements/testing.txt +++ b/scripts/user_retirement/requirements/testing.txt @@ -8,17 +8,17 @@ asgiref==3.8.1 # via # -r scripts/user_retirement/requirements/base.txt # django -attrs==24.3.0 +attrs==25.1.0 # via # -r scripts/user_retirement/requirements/base.txt # zeep backoff==2.2.1 # via -r scripts/user_retirement/requirements/base.txt -boto3==1.36.5 +boto3==1.36.6 # via # -r scripts/user_retirement/requirements/base.txt # moto -botocore==1.36.5 +botocore==1.36.6 # via # -r scripts/user_retirement/requirements/base.txt # boto3