Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
chore: un-pin pylint (required hack in pylintrc_tweaks)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Oct 12, 2022
1 parent 7994665 commit c2a782b
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ html_coverage: ## Generate HTML coverage report

quality: ## Run quality checks
${VENV_BIN}/pycodestyle --config=pycodestyle blockstore *.py
${VENV_BIN}/pylint --django-settings-module=blockstore.settings.test --rcfile=pylintrc blockstore *.py
${VENV_BIN}/pylint --django-settings-module=blockstore.settings.test blockstore *.py

validate: test quality ## Run tests and quality checks

Expand Down
2 changes: 1 addition & 1 deletion blockstore/apps/bundles/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from django.core.files.base import ContentFile, File
from django.dispatch import Signal
import attr
from pyblake2 import blake2b
from pyblake2 import blake2b # pylint:disable=no-name-in-module

from .links import Dependency, Link, LinkCollection, LinkChangeSet
from .storage import default_asset_storage
Expand Down
2 changes: 1 addition & 1 deletion blockstore/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
urlpatterns += make_docs_urls(api_info)

if settings.DEBUG: # pragma: no cover
import debug_toolbar # pylint: disable=import-error
import debug_toolbar # pylint: disable=import-error,useless-suppression
urlpatterns.append(url(r'^__debug__/', include(debug_toolbar.urls)))

if settings.DEBUG or os.environ['DJANGO_SETTINGS_MODULE'] == 'blockstore.settings.test':
Expand Down
9 changes: 5 additions & 4 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.2.5
# Generated by edx-lint version: 5.3.0
# ------------------------------
[MASTER]
ignore = ,migrations, settings, setup.py, wsgi.py
persistent = yes
load-plugins = edx_lint.pylint,pylint_django,pylint_celery
init-hook = 'import sys; sys.path.append("")'

[MESSAGES CONTROL]
enable =
Expand Down Expand Up @@ -285,7 +286,7 @@ disable =
feature-toggle-needs-doc,
illegal-waffle-usage,

logging-fstring-interpolation,,invalid-name
logging-fstring-interpolation,,invalid-name,unsupported-binary-operation

[REPORTS]
output-format = text
Expand Down Expand Up @@ -326,7 +327,7 @@ ignore-imports = no

[TYPECHECK]
ignore-mixin-members = yes
ignored-classes = _CountingAttr
ignored-classes = SQLObject
unsafe-load-any-extension = yes
generated-members =
REQUEST,
Expand Down Expand Up @@ -382,4 +383,4 @@ int-import-graph =
[EXCEPTIONS]
overgeneral-exceptions = Exception

# af4b89c321cd6c4fd061d9367951e9d91f546565
# 3a1a71317c6216efa3b67e5336f5665ba2fbeb12
12 changes: 6 additions & 6 deletions pylintrc_tweaks
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[MASTER]
ignore+= ,migrations, settings, setup.py, wsgi.py
# For some reason, pylint 2.15+ isn't working without this fix. Normally
# sys.path contains "" as the first entry, but for some reason it's missing.
init-hook='import sys; sys.path.append("")'

[BASIC]
const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns|logger|User)$

[MESSAGES CONTROL]
DISABLE+= ,invalid-name

# Our version of pylint doesn't understand attr() generated classes.
# Can remove this once edx-lint is updated to the latest pylint
[TYPECHECK]
ignored-classes=_CountingAttr
# The 'unsupported-binary-operation' check needs to be disabled on Python<3.10 but can be left enabled once we upgrade
# to 3.10+
DISABLE+= ,invalid-name,unsupported-binary-operation
7 changes: 0 additions & 7 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,3 @@
boto3<2.0

django>3.2,<3.3

# pylint 2.15.0 through 2.15.4 is currently not working with Blockstore
# it gives "django.core.exceptions.ImproperlyConfigured" due to
# "ModuleNotFoundError: No module named 'blockstore'"
# This is a temporary constraint while we investigate the issue, so as not to
# block other upgrades; it should be removed ASAP.
pylint<2.15.0
8 changes: 2 additions & 6 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ asgiref==3.5.2
# via
# -r requirements/test.txt
# django
astroid==2.11.7
astroid==2.12.11
# via
# -r requirements/test.txt
# pylint
Expand Down Expand Up @@ -265,9 +265,8 @@ pyjwt[crypto]==2.5.0
# -r requirements/test.txt
# edx-auth-backends
# social-auth-core
pylint==2.14.5
pylint==2.15.4
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# edx-lint
# pylint-celery
Expand Down Expand Up @@ -447,6 +446,3 @@ wrapt==1.14.1
# via
# -r requirements/test.txt
# astroid

# The following packages are considered to be unsafe in a requirements file:
# setuptools
8 changes: 2 additions & 6 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ asgiref==3.5.2
# via
# -r requirements/base.txt
# django
astroid==2.11.7
astroid==2.12.11
# via
# -r requirements/test.in
# pylint
Expand Down Expand Up @@ -207,9 +207,8 @@ pyjwt[crypto]==2.5.0
# -r requirements/base.txt
# edx-auth-backends
# social-auth-core
pylint==2.14.5
pylint==2.15.4
# via
# -c requirements/constraints.txt
# edx-lint
# pylint-celery
# pylint-django
Expand Down Expand Up @@ -329,6 +328,3 @@ urllib3==1.26.12
# requests
wrapt==1.14.1
# via astroid

# The following packages are considered to be unsafe in a requirements file:
# setuptools

0 comments on commit c2a782b

Please sign in to comment.