Skip to content

Commit

Permalink
fix: pylint pin
Browse files Browse the repository at this point in the history
  • Loading branch information
irtazaakram committed Oct 25, 2023
1 parent d18bf2c commit 96a1969
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ def handle(self, *args, **options):
if error_keys:
msg = 'The following courses encountered errors and were not updated:\n'
for error_key in error_keys:
msg += f' - {error_key}\n'
msg += f' - {error_key}\n' # pylint: disable=consider-using-join
logger.info(msg)
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def handle(self, *args, **options):
self.change_enrollments(csv_file)

else:
CommandError('No file is provided. File is required')
CommandError('No file is provided. File is required') # pylint: disable=pointless-exception-statement

def change_enrollments(self, csv_file):
""" change the enrollments of the learners. """
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/discussion/rest_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ def get_thread_list(
if view in ["unread", "unanswered", "unresponded"]:
query_params[view] = "true"
else:
ValidationError({
ValidationError({ # pylint: disable=pointless-exception-statement
"view": [f"Invalid value. '{view}' must be 'unread' or 'unanswered'"]
})

Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/experiments/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def get_bucket(self, course_key=None, track=True):
if (
track and hasattr(request, 'session') and
session_key not in request.session and
not masquerading_as_specific_student and not anonymous
not masquerading_as_specific_student and not anonymous # pylint: disable=used-before-assignment
):
segment.track(
user_id=user.id,
Expand Down
12 changes: 8 additions & 4 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.3.0
# Generated by edx-lint version: 5.3.6
# ------------------------------
[MASTER]
ignore = ,.git,.tox,migrations,node_modules,.pycharm_helpers
persistent = yes
load-plugins = edx_lint.pylint,pylint_django,pylint_celery,pylint_pytest
load-plugins = edx_lint.pylint,pylint_django,pylint_celery

[MESSAGES CONTROL]
enable =
Expand Down Expand Up @@ -259,6 +259,7 @@ enable =
useless-suppression,
disable =
bad-indentation,
broad-exception-raised,
consider-using-f-string,
duplicate-code,
file-ignored,
Expand Down Expand Up @@ -313,6 +314,9 @@ disable =
c-extension-no-member,
no-name-in-module,
unnecessary-lambda-assignment,
superfluous-parens,
use-dict-literal,
no-else-raise

[REPORTS]
output-format = text
Expand Down Expand Up @@ -407,6 +411,6 @@ ext-import-graph =
int-import-graph =

[EXCEPTIONS]
overgeneral-exceptions = Exception
overgeneral-exceptions = builtins.Exception

# 567bf30b121db79bc07a7028651f7efa0724e8a4
# 6c66a0d0aaf2a6b1b3d40aea4faaadaa83a399e9
3 changes: 3 additions & 0 deletions pylintrc_tweaks
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ disable+ =
c-extension-no-member,
no-name-in-module,
unnecessary-lambda-assignment,
superfluous-parens,
use-dict-literal,
no-else-raise

[BASIC]
attr-rgx = [a-z_][a-z0-9_]{2,40}$
Expand Down
3 changes: 0 additions & 3 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ pyopenssl==22.0.0

cryptography==38.0.4 # greater version has some issues with openssl.

pylint<2.16.0 # greater version failing quality test. Fix them in seperate ticket.


# Deprecated version of the AWS SDK;
# we should stop using this
boto==2.39.0
Expand Down
6 changes: 3 additions & 3 deletions requirements/edx/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ asn1crypto==1.5.1
# -r requirements/edx/testing.txt
# oscrypto
# snowflake-connector-python
astroid==2.13.5
astroid==3.0.1
# via
# -r requirements/edx/testing.txt
# pylint
Expand Down Expand Up @@ -772,7 +772,7 @@ edx-i18n-tools==1.3.0
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# ora2
edx-lint==5.3.4
edx-lint==5.3.6
# via -r requirements/edx/testing.txt
edx-milestones==0.5.0
# via
Expand Down Expand Up @@ -1521,7 +1521,7 @@ pylatexenc==2.10
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# olxcleaner
pylint==2.15.10
pylint==3.0.2
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/testing.txt
Expand Down
6 changes: 3 additions & 3 deletions requirements/edx/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ asn1crypto==1.5.1
# -r requirements/edx/base.txt
# oscrypto
# snowflake-connector-python
astroid==2.13.5
astroid==3.0.1
# via
# pylint
# pylint-celery
Expand Down Expand Up @@ -598,7 +598,7 @@ edx-i18n-tools==1.3.0
# -r requirements/edx/base.txt
# -r requirements/edx/testing.in
# ora2
edx-lint==5.3.4
edx-lint==5.3.6
# via -r requirements/edx/testing.in
edx-milestones==0.5.0
# via -r requirements/edx/base.txt
Expand Down Expand Up @@ -1139,7 +1139,7 @@ pylatexenc==2.10
# via
# -r requirements/edx/base.txt
# olxcleaner
pylint==2.15.10
pylint==3.0.2
# via
# -c requirements/edx/../constraints.txt
# edx-lint
Expand Down

0 comments on commit 96a1969

Please sign in to comment.