fix: Removed pylint constraint (#28222)
Disabled pylint warnings in pylint_tweaks
This commit is contained in:
@@ -448,7 +448,7 @@ class XMLModuleStore(ModuleStoreReadBase):
|
||||
org = 'edx'
|
||||
|
||||
# Parent XML should be something like 'library.xml' or 'course.xml'
|
||||
courselike_label = self.parent_xml.split('.')[0]
|
||||
courselike_label = self.parent_xml.split('.', maxsplit=1)[0]
|
||||
|
||||
course = course_data.get(courselike_label)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Utilities related to API views
|
||||
"""
|
||||
|
||||
from collections import Sequence # lint-amnesty, pylint: disable=no-name-in-module
|
||||
from collections import Sequence # lint-amnesty, pylint: disable=no-name-in-module, deprecated-class
|
||||
from functools import wraps
|
||||
|
||||
from django.core.exceptions import NON_FIELD_ERRORS, ObjectDoesNotExist, ValidationError
|
||||
|
||||
@@ -6,7 +6,7 @@ Unit test tasks
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from optparse import make_option
|
||||
from optparse import make_option # pylint: disable=deprecated-module
|
||||
|
||||
from paver.easy import cmdopts, needs, sh, task, call_task
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Provides:
|
||||
"""
|
||||
|
||||
|
||||
from optparse import BadOptionError, OptionParser
|
||||
from optparse import BadOptionError, OptionParser # pylint: disable=deprecated-module
|
||||
from unittest.mock import patch
|
||||
|
||||
import paver.tasks
|
||||
|
||||
@@ -4,7 +4,7 @@ Definitions of all options used by the various bok_choy tasks.
|
||||
|
||||
|
||||
import os
|
||||
from optparse import make_option
|
||||
from optparse import make_option # pylint: disable=deprecated-module
|
||||
|
||||
from pavelib.utils.envs import Env
|
||||
|
||||
|
||||
53
pylintrc
53
pylintrc
@@ -75,10 +75,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,
|
||||
@@ -215,7 +215,7 @@ enable =
|
||||
using-constant-test,
|
||||
yield-outside-function,
|
||||
zip-builtin-not-iterating,
|
||||
|
||||
|
||||
astroid-error,
|
||||
django-not-available-placeholder,
|
||||
django-not-available,
|
||||
@@ -223,20 +223,20 @@ enable =
|
||||
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,
|
||||
@@ -274,31 +274,31 @@ 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-indentation,
|
||||
mixed-line-endings,
|
||||
trailing-newlines,
|
||||
trailing-whitespace,
|
||||
unexpected-line-ending-format,
|
||||
|
||||
|
||||
bad-inline-option,
|
||||
bad-option-value,
|
||||
deprecated-pragma,
|
||||
unrecognized-inline-option,
|
||||
useless-suppression,
|
||||
|
||||
|
||||
cmp-method,
|
||||
coerce-method,
|
||||
delslice-method,
|
||||
@@ -315,7 +315,7 @@ enable =
|
||||
rdiv-method,
|
||||
setslice-method,
|
||||
using-cmp-argument,
|
||||
disable =
|
||||
disable =
|
||||
bad-continuation,
|
||||
bad-indentation,
|
||||
duplicate-code,
|
||||
@@ -342,10 +342,10 @@ disable =
|
||||
too-many-return-statements,
|
||||
ungrouped-imports,
|
||||
unused-wildcard-import,
|
||||
|
||||
|
||||
feature-toggle-needs-doc,
|
||||
illegal-waffle-usage,
|
||||
|
||||
|
||||
apply-builtin,
|
||||
backtick,
|
||||
bad-python3-import,
|
||||
@@ -383,7 +383,7 @@ disable =
|
||||
unicode-builtin,
|
||||
unpacking-in-except,
|
||||
xrange-builtin,
|
||||
|
||||
|
||||
logging-fstring-interpolation,
|
||||
native-string,
|
||||
import-outside-toplevel,
|
||||
@@ -395,6 +395,13 @@ disable =
|
||||
cyclic-import,
|
||||
logging-format-interpolation,
|
||||
wrong-import-order,
|
||||
consider-using-dict-items,
|
||||
unnecessary-dict-index-lookup,
|
||||
arguments-renamed,
|
||||
consider-using-from-import,
|
||||
consider-using-enumerate,
|
||||
no-member,
|
||||
consider-using-with,
|
||||
|
||||
[REPORTS]
|
||||
output-format = text
|
||||
@@ -440,7 +447,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,
|
||||
@@ -466,7 +473,7 @@ generated-members =
|
||||
[VARIABLES]
|
||||
init-import = no
|
||||
dummy-variables-rgx = _|dummy|unused|.*_unused
|
||||
additional-builtins =
|
||||
additional-builtins =
|
||||
|
||||
[CLASSES]
|
||||
defining-attr-methods = __init__,__new__,setUp
|
||||
@@ -487,11 +494,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 = Exception
|
||||
|
||||
# 09db2baee601ac448d0a7336689375646b15fa35
|
||||
# da8e79d46675a1e64dfd1d3f1f909b06c63a6949
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# pylintrc tweaks for use with edx_lint.
|
||||
[MASTER]
|
||||
ignore+ = ,.git,.tox,migrations,node_modules,.pycharm_helpers
|
||||
load-plugins = edx_lint.pylint,pylint_django_settings,pylint_django,pylint_celery,pylint_pytest
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable+ =
|
||||
@@ -15,8 +16,14 @@ disable+ =
|
||||
useless-suppression,
|
||||
cyclic-import,
|
||||
logging-format-interpolation,
|
||||
# isort>5.0.0 introduced this warnings in a lot of import statements
|
||||
wrong-import-order,
|
||||
consider-using-dict-items,
|
||||
unnecessary-dict-index-lookup,
|
||||
arguments-renamed,
|
||||
consider-using-from-import,
|
||||
consider-using-enumerate,
|
||||
no-member,
|
||||
consider-using-with,
|
||||
|
||||
[BASIC]
|
||||
attr-rgx = [a-z_][a-z0-9_]{2,40}$
|
||||
|
||||
@@ -93,9 +93,6 @@ social-auth-core<4.0.0 # social-auth-core>=4.0.0 requires PYJWT>=2.0.0
|
||||
# celery requires click<8.0.0 which would be fixed once https://github.com/celery/celery/issues/6753 is done.
|
||||
click<8.0.0
|
||||
|
||||
# pylint==2.9.3 introduced a lot of new warnings. It will be removed in https://openedx.atlassian.net/browse/BOM-2667.
|
||||
pylint==2.8.3
|
||||
|
||||
# constraints present due to Python35 support. Need to be tested and removed independently.
|
||||
|
||||
# jsonfield2 will be replaced with jsonfield in https://openedx.atlassian.net/browse/BOM-1917.
|
||||
|
||||
@@ -57,7 +57,7 @@ appdirs==1.4.4
|
||||
# via
|
||||
# -r requirements/edx/testing.txt
|
||||
# fs
|
||||
astroid==2.5.6
|
||||
astroid==2.6.2
|
||||
# via
|
||||
# -r requirements/edx/testing.txt
|
||||
# pylint
|
||||
@@ -996,9 +996,8 @@ pylatexenc==2.10
|
||||
# via
|
||||
# -r requirements/edx/testing.txt
|
||||
# olxcleaner
|
||||
pylint==2.8.3
|
||||
pylint==2.9.3
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
# -r requirements/edx/testing.txt
|
||||
# edx-lint
|
||||
# pylint-celery
|
||||
|
||||
@@ -55,7 +55,7 @@ appdirs==1.4.4
|
||||
# via
|
||||
# -r requirements/edx/base.txt
|
||||
# fs
|
||||
astroid==2.5.6
|
||||
astroid==2.6.2
|
||||
# via
|
||||
# pylint
|
||||
# pylint-celery
|
||||
@@ -941,9 +941,8 @@ pylatexenc==2.10
|
||||
# via
|
||||
# -r requirements/edx/base.txt
|
||||
# olxcleaner
|
||||
pylint==2.8.3
|
||||
pylint==2.9.3
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
# edx-lint
|
||||
# pylint-celery
|
||||
# pylint-django
|
||||
|
||||
Reference in New Issue
Block a user