refactor: Apply lint-amnesty on pylint violations

This commit is contained in:
Usama Sadiq
2021-04-15 16:35:04 +05:00
parent 62c8805e3e
commit ab41a7daee
25 changed files with 40 additions and 41 deletions

View File

@@ -40,13 +40,13 @@ def waffle_flags():
# TODO: After removing this flag, add a migration to remove waffle flag in a follow-up deployment.
ENABLE_CHECKLISTS_QUALITY = CourseWaffleFlag(
ENABLE_CHECKLISTS_QUALITY = CourseWaffleFlag( # lint-amnesty, pylint: disable=toggle-missing-annotation
waffle_namespace=waffle_flags(),
flag_name='enable_checklists_quality',
module_name=__name__,
)
SHOW_REVIEW_RULES_FLAG = CourseWaffleFlag(
SHOW_REVIEW_RULES_FLAG = CourseWaffleFlag( # lint-amnesty, pylint: disable=toggle-missing-annotation
waffle_namespace=waffle_flags(),
flag_name='show_review_rules',
module_name=__name__,

View File

@@ -5,10 +5,10 @@ This file contains celery tasks for contentstore views
import base64
import json
import os
import shutil
import tarfile
from datetime import datetime
from tempfile import NamedTemporaryFile, mkdtemp
import shutil # lint-amnesty, pylint: disable=wrong-import-order
import tarfile # lint-amnesty, pylint: disable=wrong-import-order
from datetime import datetime # lint-amnesty, pylint: disable=wrong-import-order
from tempfile import NamedTemporaryFile, mkdtemp # lint-amnesty, pylint: disable=wrong-import-order
import olxcleaner
import pkg_resources

View File

@@ -114,7 +114,7 @@ def _save_request_status(request, key, status):
request.session.save()
def _write_chunk(request, courselike_key):
def _write_chunk(request, courselike_key): # lint-amnesty, pylint: disable=too-many-statements
"""
Write the OLX file data chunk from the given request to the local filesystem.
"""

View File

@@ -52,7 +52,7 @@ from ..videos import (
convert_video_status
)
VIDEO_IMAGE_UPLOAD_ENABLED_SWITCH = LegacyWaffleSwitch(WAFFLE_SWITCHES, VIDEO_IMAGE_UPLOAD_ENABLED)
VIDEO_IMAGE_UPLOAD_ENABLED_SWITCH = LegacyWaffleSwitch(WAFFLE_SWITCHES, VIDEO_IMAGE_UPLOAD_ENABLED) # lint-amnesty, pylint: disable=toggle-missing-annotation
class VideoUploadTestBase:

View File

@@ -80,7 +80,7 @@ VIDEO_IMAGE_UPLOAD_ENABLED = 'video_image_upload_enabled'
# Waffle flag namespace for studio
WAFFLE_STUDIO_FLAG_NAMESPACE = LegacyWaffleFlagNamespace(name='studio')
ENABLE_VIDEO_UPLOAD_PAGINATION = CourseWaffleFlag(
ENABLE_VIDEO_UPLOAD_PAGINATION = CourseWaffleFlag( # lint-amnesty, pylint: disable=toggle-missing-annotation
waffle_namespace=WAFFLE_STUDIO_FLAG_NAMESPACE,
flag_name='enable_video_upload_pagination',
module_name=__name__,

View File

@@ -8,7 +8,7 @@ WAFFLE_NAMESPACE = 'grades'
# edx/edx-platform feature
MATERIAL_RECOMPUTE_ONLY = 'MATERIAL_RECOMPUTE_ONLY'
MATERIAL_RECOMPUTE_ONLY_FLAG = CourseWaffleFlag(
MATERIAL_RECOMPUTE_ONLY_FLAG = CourseWaffleFlag( # lint-amnesty, pylint: disable=toggle-missing-annotation
waffle_namespace=WAFFLE_NAMESPACE,
flag_name=MATERIAL_RECOMPUTE_ONLY,
module_name=__name__,