Skip to content

Commit

Permalink
fix: remove pylint constraint (#36169)
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq authored Jan 27, 2025
1 parent 3847cec commit 2d7a3d3
Show file tree
Hide file tree
Showing 14 changed files with 98 additions and 99 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: skip-file
"""
Tests for the clipboard functionality
"""
Expand Down
8 changes: 3 additions & 5 deletions pylint_django_settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pylint_django.checkers import ForeignKeyStringsChecker
from pylint_plugin_utils import get_checker
import os
import sys


class ArgumentCompatibilityError(Exception):
Expand Down Expand Up @@ -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:]))
56 changes: 34 additions & 22 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@
# 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
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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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
13 changes: 13 additions & 0 deletions pylintrc_tweaks
Original file line number Diff line number Diff line change
Expand Up @@ -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}$
Expand Down
5 changes: 0 additions & 5 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx-sandbox/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions requirements/edx/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
30 changes: 11 additions & 19 deletions requirements/edx/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 2d7a3d3

Please sign in to comment.