Merge pull request #6090 from edx/sarina/pylint-cleanup
Make inline "pylint: disable=" notes more clear
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=E0611
|
||||
from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=no-name-in-module
|
||||
from common import type_in_codemirror, press_the_notification_button, get_codemirror_value
|
||||
|
||||
KEY_CSS = '.key h3.title'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from nose.tools import assert_true, assert_equal # pylint: disable=E0611
|
||||
from nose.tools import assert_true, assert_equal # pylint: disable=no-name-in-module
|
||||
from terrain.steps import reload_the_page
|
||||
from selenium.common.exceptions import StaleElementReferenceException
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
import os
|
||||
from lettuce import world, step
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
# Lettuce formats proposed definitions for unimplemented steps with the
|
||||
# argument name "step" instead of "_step" and pylint does not like that.
|
||||
# pylint: disable=W0613
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
from lettuce import world, step
|
||||
from nose.tools import assert_true, assert_in, assert_equal # pylint: disable=E0611
|
||||
from nose.tools import assert_true, assert_in, assert_equal # pylint: disable=no-name-in-module
|
||||
|
||||
DISPLAY_NAME = "Display Name"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# disable missing docstring
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=missing-docstring
|
||||
|
||||
from lettuce import world
|
||||
from nose.tools import assert_equal, assert_in # pylint: disable=E0611
|
||||
from nose.tools import assert_equal, assert_in # pylint: disable=no-name-in-module
|
||||
from terrain.steps import reload_the_page
|
||||
from common import type_in_codemirror
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=W0613
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
from lettuce import world, step
|
||||
from component_settings_editor_helpers import enter_xml_in_advanced_problem
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from common import *
|
||||
from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=E0611
|
||||
from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=no-name-in-module
|
||||
|
||||
from logging import getLogger
|
||||
logger = getLogger(__name__)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from terrain.steps import reload_the_page
|
||||
@@ -7,7 +7,7 @@ from selenium.webdriver.common.keys import Keys
|
||||
from common import type_in_codemirror, upload_file
|
||||
from django.conf import settings
|
||||
|
||||
from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=E0611
|
||||
from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=no-name-in-module
|
||||
|
||||
TEST_ROOT = settings.COMMON_TEST_DATA_ROOT
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from nose.tools import assert_in # pylint: disable=E0611
|
||||
from nose.tools import assert_in # pylint: disable=no-name-in-module
|
||||
|
||||
|
||||
@step(u'(I am viewing|s?he views) the course team settings$')
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
from common import type_in_codemirror, get_codemirror_value
|
||||
from nose.tools import assert_in # pylint: disable=E0611
|
||||
from nose.tools import assert_in # pylint: disable=no-name-in-module
|
||||
|
||||
|
||||
@step(u'I go to the course updates page')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=W0613
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
import os
|
||||
from lettuce import world, step
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from common import *
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# disable missing docstring
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=missing-docstring
|
||||
|
||||
from lettuce import world, step
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from common import *
|
||||
@@ -7,7 +7,7 @@ from terrain.steps import reload_the_page
|
||||
from selenium.common.exceptions import InvalidElementStateException
|
||||
from opaque_keys.edx.locations import SlashSeparatedCourseKey
|
||||
from contentstore.utils import reverse_course_url
|
||||
from nose.tools import assert_in, assert_not_in, assert_equal, assert_not_equal # pylint: disable=E0611
|
||||
from nose.tools import assert_in, assert_not_in, assert_equal, assert_not_equal # pylint: disable=no-name-in-module
|
||||
|
||||
|
||||
@step(u'I am viewing the grading settings')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=W0613
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
from nose.tools import assert_false # pylint: disable=no-name-in-module
|
||||
from lettuce import step, world
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# disable missing docstring
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=missing-docstring
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=W0613
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
from lettuce import world, step
|
||||
from nose.tools import assert_equal, assert_in # pylint: disable=E0611
|
||||
from nose.tools import assert_equal, assert_in # pylint: disable=no-name-in-module
|
||||
|
||||
|
||||
CSS_FOR_TAB_ELEMENT = "li[data-tab-id='{0}'] input.toggle-checkbox"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# disable missing docstring
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=missing-docstring
|
||||
|
||||
import json
|
||||
from lettuce import world, step
|
||||
from nose.tools import assert_equal, assert_true # pylint: disable=E0611
|
||||
from nose.tools import assert_equal, assert_true # pylint: disable=no-name-in-module
|
||||
from common import type_in_codemirror, open_new_course
|
||||
from advanced_settings import change_value, ADVANCED_MODULES_KEY
|
||||
from course_import import import_file
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from django.conf import settings
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# disable missing docstring
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=missing-docstring
|
||||
|
||||
import os
|
||||
from lettuce import world, step
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from lettuce.django import django_url
|
||||
@@ -10,7 +10,7 @@ import random
|
||||
import os
|
||||
from django.contrib.auth.models import User
|
||||
from student.models import CourseEnrollment
|
||||
from nose.tools import assert_equal, assert_not_equal # pylint: disable=E0611
|
||||
from nose.tools import assert_equal, assert_not_equal # pylint: disable=no-name-in-module
|
||||
|
||||
TEST_ROOT = settings.COMMON_TEST_DATA_ROOT
|
||||
ASSET_NAMES_CSS = 'td.name-col > span.title > a.filename'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# disable missing docstring
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=missing-docstring
|
||||
|
||||
import requests
|
||||
from lettuce import world, step
|
||||
from nose.tools import assert_true, assert_equal, assert_in, assert_not_equal # pylint: disable=E0611
|
||||
from nose.tools import assert_true, assert_equal, assert_in, assert_not_equal # pylint: disable=no-name-in-module
|
||||
from terrain.steps import reload_the_page
|
||||
from django.conf import settings
|
||||
from common import upload_file, attach_file
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# disable missing docstring
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=missing-docstring
|
||||
|
||||
from lettuce import world, step
|
||||
from nose.tools import assert_true # pylint: disable=E0611
|
||||
from nose.tools import assert_true # pylint: disable=no-name-in-module
|
||||
from video_editor import RequestHandlerWithSessionId, success_upload_file
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ def cmd_log(cmd, cwd):
|
||||
|
||||
def export_to_git(course_id, repo, user='', rdir=None):
|
||||
"""Export a course to git."""
|
||||
# pylint: disable=R0915
|
||||
# pylint: disable=too-many-statements
|
||||
|
||||
if not GIT_REPO_EXPORT_DIR:
|
||||
raise GitExportError(GitExportError.NO_EXPORT_DIR)
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=E1101
|
||||
# pylint: disable=W0212
|
||||
|
||||
import copy
|
||||
import mock
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# pylint: disable=E1101
|
||||
# pylint: disable=no-member
|
||||
# pylint: disable=protected-access
|
||||
"""
|
||||
Tests for import_from_xml using the mongo modulestore.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# pylint: disable=E1101
|
||||
# pylint: disable=no-member
|
||||
'''
|
||||
Utilities for contentstore tests
|
||||
'''
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# pylint: disable=E1103, E1101
|
||||
"""
|
||||
Common utility functions useful throughout the contentstore
|
||||
"""
|
||||
# pylint: disable=no-member
|
||||
|
||||
import copy
|
||||
import logging
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# pylint: disable=W0401, W0511
|
||||
# pylint: disable=wildcard-import, fixme
|
||||
|
||||
"All view functions for contentstore, broken out into submodules"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ Views related to operations on course objects
|
||||
"""
|
||||
import json
|
||||
import random
|
||||
import string # pylint: disable=W0402
|
||||
import string # pylint: disable=deprecated-module
|
||||
import logging
|
||||
from django.utils.translation import ugettext as _
|
||||
import django.utils
|
||||
|
||||
@@ -3,7 +3,7 @@ Views that are only activated when the project is running in development mode.
|
||||
These views will NOT be shown on production: trying to access them will result
|
||||
in a 404 error.
|
||||
"""
|
||||
# pylint: disable=W0613
|
||||
# pylint: disable=unused-argument
|
||||
from edxmako.shortcuts import render_to_response
|
||||
from mako.exceptions import TopLevelLookupException
|
||||
from django.http import HttpResponseNotFound
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# pylint: disable=C0111,W0613
|
||||
# pylint: disable=missing-docstring,unused-argument
|
||||
|
||||
from django.http import (HttpResponse, HttpResponseServerError,
|
||||
HttpResponseNotFound)
|
||||
|
||||
@@ -152,7 +152,7 @@ def import_handler(request, course_key_string):
|
||||
}]
|
||||
})
|
||||
# Send errors to client with stage at which error occurred.
|
||||
except Exception as exception: # pylint: disable=W0703
|
||||
except Exception as exception: # pylint: disable=broad-except
|
||||
_save_request_status(request, key, -1)
|
||||
if course_dir.isdir():
|
||||
shutil.rmtree(course_dir)
|
||||
@@ -251,7 +251,7 @@ def import_handler(request, course_key_string):
|
||||
_save_request_status(request, key, 4)
|
||||
|
||||
# Send errors to client with stage at which error occurred.
|
||||
except Exception as exception: # pylint: disable=W0703
|
||||
except Exception as exception: # pylint: disable=broad-except
|
||||
log.exception(
|
||||
"error importing course"
|
||||
)
|
||||
|
||||
@@ -221,7 +221,7 @@ def xblock_view_handler(request, usage_key_string, view_name):
|
||||
# catch exceptions indiscriminately, since after this point they escape the
|
||||
# dungeon and surface as uneditable, unsaveable, and undeletable
|
||||
# component-goblins.
|
||||
except Exception as exc: # pylint: disable=w0703
|
||||
except Exception as exc: # pylint: disable=broad-except
|
||||
log.debug("unable to render studio_view for %r", xblock, exc_info=True)
|
||||
fragment = Fragment(render_to_string('html_error.html', {'message': str(exc)}))
|
||||
|
||||
@@ -585,7 +585,7 @@ def _delete_item(usage_key, user):
|
||||
store.delete_item(usage_key, user.id)
|
||||
|
||||
|
||||
# pylint: disable=W0613
|
||||
# pylint: disable=unused-argument
|
||||
@login_required
|
||||
@require_http_methods(("GET", "DELETE"))
|
||||
def orphan_handler(request, course_key_string):
|
||||
|
||||
@@ -227,7 +227,7 @@ def get_preview_fragment(request, descriptor, context):
|
||||
|
||||
try:
|
||||
fragment = module.render(preview_view, context)
|
||||
except Exception as exc: # pylint: disable=W0703
|
||||
except Exception as exc: # pylint: disable=broad-except
|
||||
log.warning("Unable to render %s for %r", preview_view, module, exc_info=True)
|
||||
fragment = Fragment(render_to_string('html_error.html', {'message': str(exc)}))
|
||||
return fragment
|
||||
|
||||
@@ -71,4 +71,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['course_creators']
|
||||
complete_apps = ['course_creators']
|
||||
|
||||
@@ -5,7 +5,7 @@ so that we can run the lettuce acceptance tests.
|
||||
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0614
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
from .test import *
|
||||
from lms.envs.sauce import *
|
||||
@@ -113,7 +113,7 @@ SELENIUM_GRID = {
|
||||
#####################################################################
|
||||
# Lastly, see if the developer has any local overrides.
|
||||
try:
|
||||
from .private import * # pylint: disable=F0401
|
||||
from .private import * # pylint: disable=import-error
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ This is the default template for our main set of AWS servers.
|
||||
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0614
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
import json
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ LMS with enough privileges to modify the database schema.
|
||||
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0614
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
# Import everything from .aws so that our settings are based on those.
|
||||
from .aws import *
|
||||
|
||||
@@ -13,9 +13,9 @@ from path import path
|
||||
# This is a convenience for ensuring (a) that we can consistently find the files
|
||||
# and (b) that the files are the same in Jenkins as in local dev.
|
||||
os.environ['SERVICE_VARIANT'] = 'bok_choy'
|
||||
os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() # pylint: disable=E1120
|
||||
os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() # pylint: disable=no-value-for-parameter
|
||||
|
||||
from .aws import * # pylint: disable=W0401, W0614
|
||||
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
######################### Testing overrides ####################################
|
||||
|
||||
@@ -23,7 +23,7 @@ from .aws import * # pylint: disable=W0401, W0614
|
||||
INSTALLED_APPS += ('django_extensions',)
|
||||
|
||||
# Redirect to the test_root folder within the repo
|
||||
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" # pylint: disable=E1120
|
||||
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" # pylint: disable=no-value-for-parameter
|
||||
GITHUB_REPO_ROOT = (TEST_ROOT / "data").abspath()
|
||||
LOG_DIR = (TEST_ROOT / "log").abspath()
|
||||
|
||||
@@ -31,7 +31,7 @@ LOG_DIR = (TEST_ROOT / "log").abspath()
|
||||
update_module_store_settings(
|
||||
MODULESTORE,
|
||||
module_store_options={
|
||||
'fs_root': (TEST_ROOT / "data").abspath(), # pylint: disable=E1120
|
||||
'fs_root': (TEST_ROOT / "data").abspath(), # pylint: disable=no-value-for-parameter
|
||||
},
|
||||
xml_store_options={
|
||||
'data_dir': (TEST_ROOT / "data").abspath(),
|
||||
@@ -66,6 +66,6 @@ YOUTUBE['TEXT_API']['url'] = "127.0.0.1:{0}/test_transcripts_youtube/".format(YO
|
||||
#####################################################################
|
||||
# Lastly, see if the developer has any local overrides.
|
||||
try:
|
||||
from .private import * # pylint: disable=F0401
|
||||
from .private import * # pylint: disable=import-error
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -22,7 +22,7 @@ Longer TODO:
|
||||
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0611, W0614
|
||||
# pylint: disable=wildcard-import, unused-import, unused-wildcard-import
|
||||
|
||||
import imp
|
||||
import os
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# pylint: disable=W0614, W0401
|
||||
from .dev import *
|
||||
"""
|
||||
A new cms ENV configuration to use a slow upload file handler to help test
|
||||
progress bars in uploads
|
||||
"""
|
||||
# pylint: disable=unused-wildcard-import
|
||||
from .dev import * # pylint: disable=wildcard-import
|
||||
|
||||
FILE_UPLOAD_HANDLERS = (
|
||||
'contentstore.debug_file_uploader.DebugFileUploader',
|
||||
|
||||
@@ -3,7 +3,7 @@ This config file runs the simplest dev environment"""
|
||||
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0614
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
from .common import *
|
||||
from logsettings import get_logger_config
|
||||
@@ -180,6 +180,6 @@ if SEGMENT_IO_KEY:
|
||||
#####################################################################
|
||||
# Lastly, see if the developer has any local overrides.
|
||||
try:
|
||||
from .private import * # pylint: disable=F0401
|
||||
from .private import * # pylint: disable=import-error
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -4,7 +4,7 @@ This configuration is to turn on the Django Toolbar stats for DB access stats, f
|
||||
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0614
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
from .dev import *
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0614
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
# dev environment for ichuang/mit
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ the same process between preview and published
|
||||
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0614
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
from .dev import *
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ django_admin.py celery worker
|
||||
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0614
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
from dev import *
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ DEBUG_TOOLBAR_MONGO_STACKTRACES = False
|
||||
###############################################################################
|
||||
# See if the developer has any local overrides.
|
||||
try:
|
||||
from .private import * # pylint: disable=F0401
|
||||
from .private import * # pylint: disable=import-error
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ This is a localdev test for the Microsite processing pipeline
|
||||
"""
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0614
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
from .dev import *
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ sessions. Assumes structure:
|
||||
|
||||
# We intentionally define lots of variables that aren't used, and
|
||||
# want to import all variables from base settings files
|
||||
# pylint: disable=W0401, W0614
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
from .common import *
|
||||
import os
|
||||
|
||||
@@ -5,7 +5,7 @@ Module with code executed during Studio startup
|
||||
from django.conf import settings
|
||||
|
||||
# Force settings to run so that the python path is modified
|
||||
settings.INSTALLED_APPS # pylint: disable=W0104
|
||||
settings.INSTALLED_APPS # pylint: disable=pointless-statement
|
||||
|
||||
from django_startup import autostartup
|
||||
from monkey_patch import django_utils_translation
|
||||
|
||||
@@ -148,7 +148,7 @@ if settings.DEBUG:
|
||||
pass
|
||||
|
||||
# Custom error pages
|
||||
# pylint: disable=C0103
|
||||
# pylint: disable=invalid-name
|
||||
handler404 = 'contentstore.views.render_404'
|
||||
handler500 = 'contentstore.views.render_500'
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
|
||||
"""
|
||||
self.client.logout()
|
||||
resp = self.client.get(self.url_unlocked)
|
||||
self.assertEqual(resp.status_code, 200) # pylint: disable=E1103
|
||||
self.assertEqual(resp.status_code, 200)
|
||||
|
||||
def test_locked_asset_not_logged_in(self):
|
||||
"""
|
||||
@@ -78,7 +78,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
|
||||
"""
|
||||
self.client.logout()
|
||||
resp = self.client.get(self.url_locked)
|
||||
self.assertEqual(resp.status_code, 403) # pylint: disable=E1103
|
||||
self.assertEqual(resp.status_code, 403)
|
||||
|
||||
def test_locked_asset_not_registered(self):
|
||||
"""
|
||||
@@ -87,7 +87,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
|
||||
"""
|
||||
self.client.login(username=self.non_staff_usr, password=self.non_staff_pwd)
|
||||
resp = self.client.get(self.url_locked)
|
||||
self.assertEqual(resp.status_code, 403) # pylint: disable=E1103
|
||||
self.assertEqual(resp.status_code, 403)
|
||||
|
||||
def test_locked_asset_registered(self):
|
||||
"""
|
||||
@@ -99,7 +99,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
|
||||
|
||||
self.client.login(username=self.non_staff_usr, password=self.non_staff_pwd)
|
||||
resp = self.client.get(self.url_locked)
|
||||
self.assertEqual(resp.status_code, 200) # pylint: disable=E1103
|
||||
self.assertEqual(resp.status_code, 200)
|
||||
|
||||
def test_locked_asset_staff(self):
|
||||
"""
|
||||
@@ -107,7 +107,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
|
||||
"""
|
||||
self.client.login(username=self.staff_usr, password=self.staff_pwd)
|
||||
resp = self.client.get(self.url_locked)
|
||||
self.assertEqual(resp.status_code, 200) # pylint: disable=E1103
|
||||
self.assertEqual(resp.status_code, 200)
|
||||
|
||||
def test_range_request_full_file(self):
|
||||
"""
|
||||
|
||||
@@ -89,4 +89,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['course_action_state']
|
||||
complete_apps = ['course_action_state']
|
||||
|
||||
@@ -20,7 +20,7 @@ class CohortFactory(DjangoModelFactory):
|
||||
group_type = CourseUserGroup.COHORT
|
||||
|
||||
@post_generation
|
||||
def users(self, create, extracted, **kwargs): # pylint: disable=W0613
|
||||
def users(self, create, extracted, **kwargs): # pylint: disable=unused-argument
|
||||
"""
|
||||
Returns the users associated with the cohort.
|
||||
"""
|
||||
|
||||
@@ -37,4 +37,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['course_modes']
|
||||
complete_apps = ['course_modes']
|
||||
|
||||
@@ -32,4 +32,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['course_modes']
|
||||
complete_apps = ['course_modes']
|
||||
|
||||
@@ -30,4 +30,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['course_modes']
|
||||
complete_apps = ['course_modes']
|
||||
|
||||
@@ -33,4 +33,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['course_modes']
|
||||
complete_apps = ['course_modes']
|
||||
|
||||
@@ -34,4 +34,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['course_modes']
|
||||
complete_apps = ['course_modes']
|
||||
|
||||
@@ -41,4 +41,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['course_modes']
|
||||
complete_apps = ['course_modes']
|
||||
|
||||
@@ -61,4 +61,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['course_modes']
|
||||
complete_apps = ['course_modes']
|
||||
|
||||
@@ -3,8 +3,8 @@ from factory.django import DjangoModelFactory
|
||||
from opaque_keys.edx.locations import SlashSeparatedCourseKey
|
||||
|
||||
|
||||
# Factories don't have __init__ methods, and are self documenting
|
||||
# pylint: disable=W0232
|
||||
# Factories are self documenting
|
||||
# pylint: disable=missing-docstring
|
||||
class CourseModeFactory(DjangoModelFactory):
|
||||
FACTORY_FOR = CourseMode
|
||||
|
||||
|
||||
@@ -71,4 +71,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['dark_lang']
|
||||
complete_apps = ['dark_lang']
|
||||
|
||||
@@ -111,4 +111,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['embargo']
|
||||
complete_apps = ['embargo']
|
||||
|
||||
@@ -60,7 +60,7 @@ class CourseEnrollmentSerializer(serializers.ModelSerializer):
|
||||
"""Retrieves the username from the associated model."""
|
||||
return model.username
|
||||
|
||||
class Meta: # pylint: disable=C0111
|
||||
class Meta: # pylint: disable=missing-docstring
|
||||
model = CourseEnrollment
|
||||
fields = ('created', 'mode', 'is_active', 'course', 'student')
|
||||
lookup_field = 'username'
|
||||
|
||||
@@ -87,4 +87,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['external_auth']
|
||||
complete_apps = ['external_auth']
|
||||
|
||||
@@ -13,11 +13,11 @@ class ExternalAuthHelperFnTest(TestCase):
|
||||
"""
|
||||
Tests the _safe_postlogin_redirect function with different values of next
|
||||
"""
|
||||
HOST = 'testserver' # pylint: disable=C0103
|
||||
ONSITE1 = '/dashboard' # pylint: disable=C0103
|
||||
ONSITE2 = '/courses/org/num/name/courseware' # pylint: disable=C0103
|
||||
ONSITE3 = 'http://{}/my/custom/url'.format(HOST) # pylint: disable=C0103
|
||||
OFFSITE1 = 'http://www.attacker.com' # pylint: disable=C0103
|
||||
HOST = 'testserver' # pylint: disable=invalid-name
|
||||
ONSITE1 = '/dashboard' # pylint: disable=invalid-name
|
||||
ONSITE2 = '/courses/org/num/name/courseware' # pylint: disable=invalid-name
|
||||
ONSITE3 = 'http://{}/my/custom/url'.format(HOST) # pylint: disable=invalid-name
|
||||
OFFSITE1 = 'http://www.attacker.com' # pylint: disable=invalid-name
|
||||
|
||||
for redirect_to in [ONSITE1, ONSITE2, ONSITE3]:
|
||||
redir = _safe_postlogin_redirect(redirect_to, HOST)
|
||||
|
||||
@@ -582,9 +582,9 @@ class ShibUtilFnTest(TestCase):
|
||||
Tests util functions in shib module
|
||||
"""
|
||||
def test__flatten_to_ascii(self):
|
||||
DIACRITIC = u"àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=C0103
|
||||
STR_DIACRI = "àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=C0103
|
||||
FLATTENED = u"aeiouAEIOUaeiouyAEIOUYaeiouAEIOUanoANOaeiouyAEIOUYaAcC" # pylint: disable=C0103
|
||||
DIACRITIC = u"àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=invalid-name
|
||||
STR_DIACRI = "àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=invalid-name
|
||||
FLATTENED = u"aeiouAEIOUaeiouyAEIOUYaeiouAEIOUanoANOaeiouyAEIOUYaAcC" # pylint: disable=invalid-name
|
||||
self.assertEqual(_flatten_to_ascii('jasön'), 'jason') # umlaut
|
||||
self.assertEqual(_flatten_to_ascii('Jason包'), 'Jason') # mandarin, so it just gets dropped
|
||||
self.assertEqual(_flatten_to_ascii('abc'), 'abc') # pass through
|
||||
|
||||
@@ -3,7 +3,7 @@ import json
|
||||
import logging
|
||||
import random
|
||||
import re
|
||||
import string # pylint: disable=W0402
|
||||
import string # pylint: disable=deprecated-module
|
||||
import fnmatch
|
||||
import unicodedata
|
||||
import urllib
|
||||
|
||||
@@ -33,4 +33,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['reverification']
|
||||
complete_apps = ['reverification']
|
||||
|
||||
@@ -8,8 +8,8 @@ from datetime import timedelta, datetime
|
||||
from opaque_keys.edx.locations import SlashSeparatedCourseKey
|
||||
|
||||
|
||||
# Factories don't have __init__ methods, and are self documenting
|
||||
# pylint: disable=W0232
|
||||
# Factories are self documenting
|
||||
# pylint: disable=missing-docstring
|
||||
class MidcourseReverificationWindowFactory(DjangoModelFactory):
|
||||
""" Creates a generic MidcourseReverificationWindow. """
|
||||
FACTORY_FOR = MidcourseReverificationWindow
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import re
|
||||
|
||||
from nose.tools import assert_equals, assert_true, assert_false # pylint: disable=E0611
|
||||
from nose.tools import assert_equals, assert_true, assert_false # pylint: disable=no-name-in-module
|
||||
from static_replace import (replace_static_urls, replace_course_urls,
|
||||
_url_replace_regex)
|
||||
from mock import patch, Mock
|
||||
|
||||
@@ -5,7 +5,7 @@ from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from course_modes.models import CourseMode
|
||||
from third_party_auth import ( # pylint: disable=W0611
|
||||
from third_party_auth import ( # pylint: disable=unused-import
|
||||
pipeline, provider,
|
||||
is_enabled as third_party_auth_enabled
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ from opaque_keys.edx import locator
|
||||
import unittest
|
||||
import ddt
|
||||
|
||||
from shoppingcart.models import Order, CertificateItem # pylint: disable=F0401
|
||||
from shoppingcart.models import Order, CertificateItem # pylint: disable=import-error
|
||||
from course_modes.models import CourseMode
|
||||
from student.management.commands import transfer_students
|
||||
from student.models import CourseEnrollment, UNENROLL_DONE, EVENT_NAME_ENROLLMENT_DEACTIVATED, \
|
||||
@@ -36,7 +36,7 @@ class TestTransferStudents(ModuleStoreTestCase):
|
||||
"""Disconnects the UNENROLL stub receiver."""
|
||||
UNENROLL_DONE.disconnect(self.assert_unenroll_signal)
|
||||
|
||||
def assert_unenroll_signal(self, skip_refund=False, **kwargs): # pylint: disable=W0613
|
||||
def assert_unenroll_signal(self, skip_refund=False, **kwargs): # pylint: disable=unused-argument
|
||||
""" Signal Receiver stub for testing that the unenroll signal was fired. """
|
||||
self.assertFalse(self.signal_fired)
|
||||
self.assertTrue(skip_refund)
|
||||
@@ -45,8 +45,8 @@ class TestTransferStudents(ModuleStoreTestCase):
|
||||
def test_transfer_students(self):
|
||||
""" Verify the transfer student command works as intended. """
|
||||
student = UserFactory.create()
|
||||
student.set_password(self.PASSWORD) # pylint: disable=E1101
|
||||
student.save() # pylint: disable=E1101
|
||||
student.set_password(self.PASSWORD) # pylint: disable=no-member
|
||||
student.save() # pylint: disable=no-member
|
||||
mode = 'verified'
|
||||
# Original Course
|
||||
original_course_location = locator.CourseLocator('Org0', 'Course0', 'Run0')
|
||||
@@ -75,7 +75,7 @@ class TestTransferStudents(ModuleStoreTestCase):
|
||||
self.assertTrue(self.signal_fired)
|
||||
|
||||
# Confirm the analytics event was emitted.
|
||||
self.mock_tracker.emit.assert_has_calls( # pylint: disable=E1103
|
||||
self.mock_tracker.emit.assert_has_calls( # pylint: disable=maybe-no-member
|
||||
[
|
||||
call(
|
||||
EVENT_NAME_ENROLLMENT_ACTIVATED,
|
||||
|
||||
@@ -170,4 +170,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -180,4 +180,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -185,4 +185,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -191,4 +191,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -182,4 +182,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -143,4 +143,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -153,4 +153,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -186,4 +186,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -176,4 +176,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -177,4 +177,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -171,4 +171,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -169,4 +169,4 @@ class Migration(SchemaMigration):
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['student']
|
||||
complete_apps = ['student']
|
||||
|
||||
@@ -1164,7 +1164,7 @@ class CourseEnrollment(models.Model):
|
||||
if GeneratedCertificate.certificate_for_student(self.user, self.course_id) is not None:
|
||||
return False
|
||||
|
||||
#TODO - When Course administrators to define a refund period for paid courses then refundable will be supported. # pylint: disable=W0511
|
||||
#TODO - When Course administrators to define a refund period for paid courses then refundable will be supported. # pylint: disable=fixme
|
||||
|
||||
course_mode = CourseMode.mode_for_course(self.course_id, 'verified')
|
||||
if course_mode is None:
|
||||
|
||||
@@ -12,8 +12,8 @@ from uuid import uuid4
|
||||
from pytz import UTC
|
||||
from opaque_keys.edx.locations import SlashSeparatedCourseKey
|
||||
|
||||
# Factories don't have __init__ methods, and are self documenting
|
||||
# pylint: disable=W0232, C0111
|
||||
# Factories are self documenting
|
||||
# pylint: disable=missing-docstring
|
||||
|
||||
|
||||
class GroupFactory(DjangoModelFactory):
|
||||
|
||||
@@ -163,8 +163,8 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase):
|
||||
|
||||
# Check that session and CSRF are set in the response
|
||||
for cookie in ['csrftoken', 'sessionid']:
|
||||
self.assertIn(cookie, response.cookies) # pylint: disable=E1103
|
||||
self.assertTrue(response.cookies[cookie].value) # pylint: disable=E1103
|
||||
self.assertIn(cookie, response.cookies) # pylint: disable=maybe-no-member
|
||||
self.assertTrue(response.cookies[cookie].value) # pylint: disable=maybe-no-member
|
||||
|
||||
|
||||
class AutoAuthDisabledTestCase(UrlResetMixin, TestCase):
|
||||
|
||||
@@ -335,9 +335,9 @@ class UtilFnTest(TestCase):
|
||||
"""
|
||||
Tests the _parse_course_id_from_string util function
|
||||
"""
|
||||
COURSE_ID = u'org/num/run' # pylint: disable=C0103
|
||||
COURSE_URL = u'/courses/{}/otherstuff'.format(COURSE_ID) # pylint: disable=C0103
|
||||
NON_COURSE_URL = u'/blahblah' # pylint: disable=C0103
|
||||
COURSE_ID = u'org/num/run' # pylint: disable=invalid-name
|
||||
COURSE_URL = u'/courses/{}/otherstuff'.format(COURSE_ID) # pylint: disable=invalid-name
|
||||
NON_COURSE_URL = u'/blahblah' # pylint: disable=invalid-name
|
||||
self.assertEqual(
|
||||
_parse_course_id_from_string(COURSE_URL),
|
||||
SlashSeparatedCourseKey.from_deprecated_string(COURSE_ID)
|
||||
@@ -415,7 +415,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase):
|
||||
Tests the redirects when visiting course-specific URL with @login_required.
|
||||
Should vary by course depending on its enrollment_domain
|
||||
"""
|
||||
TARGET_URL = reverse('courseware', args=[self.course.id.to_deprecated_string()]) # pylint: disable=C0103
|
||||
TARGET_URL = reverse('courseware', args=[self.course.id.to_deprecated_string()]) # pylint: disable=invalid-name
|
||||
noshib_response = self.client.get(TARGET_URL, follow=True)
|
||||
self.assertEqual(noshib_response.redirect_chain[-1],
|
||||
('http://testserver/accounts/login?next={url}'.format(url=TARGET_URL), 302))
|
||||
@@ -423,7 +423,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase):
|
||||
.format(platform_name=settings.PLATFORM_NAME)))
|
||||
self.assertEqual(noshib_response.status_code, 200)
|
||||
|
||||
TARGET_URL_SHIB = reverse('courseware', args=[self.shib_course.id.to_deprecated_string()]) # pylint: disable=C0103
|
||||
TARGET_URL_SHIB = reverse('courseware', args=[self.shib_course.id.to_deprecated_string()]) # pylint: disable=invalid-name
|
||||
shib_response = self.client.get(**{'path': TARGET_URL_SHIB,
|
||||
'follow': True,
|
||||
'REMOTE_USER': self.extauth.external_id,
|
||||
|
||||
@@ -26,7 +26,7 @@ FAKE_MICROSITE = {
|
||||
}
|
||||
|
||||
|
||||
def fake_site_name(name, default=None): # pylint: disable=W0613
|
||||
def fake_site_name(name, default=None): # pylint: disable=unused-argument
|
||||
"""
|
||||
create a fake microsite site name
|
||||
"""
|
||||
@@ -36,7 +36,7 @@ def fake_site_name(name, default=None): # pylint: disable=W0613
|
||||
return default
|
||||
|
||||
|
||||
def fake_microsite_get_value(name, default=None): # pylint: disable=W0613
|
||||
def fake_microsite_get_value(name, default=None): # pylint: disable=unused-argument
|
||||
"""
|
||||
create a fake microsite site name
|
||||
"""
|
||||
|
||||
@@ -322,7 +322,7 @@ class DashboardTest(ModuleStoreTestCase):
|
||||
)
|
||||
enrollment = CourseEnrollment.enroll(self.user, self.course.id, mode='honor')
|
||||
|
||||
# TODO: Until we can allow course administrators to define a refund period for paid for courses show_refund_option should be False. # pylint: disable=W0511
|
||||
# TODO: Until we can allow course administrators to define a refund period for paid for courses show_refund_option should be False. # pylint: disable=fixme
|
||||
self.assertFalse(enrollment.refundable())
|
||||
|
||||
resp = self.client.post(reverse('student.views.dashboard', args=[]))
|
||||
|
||||
@@ -110,7 +110,7 @@ from eventtracking import tracker
|
||||
log = logging.getLogger("edx.student")
|
||||
AUDIT_LOG = logging.getLogger("audit")
|
||||
|
||||
ReverifyInfo = namedtuple('ReverifyInfo', 'course_id course_name course_number date status display') # pylint: disable=C0103
|
||||
ReverifyInfo = namedtuple('ReverifyInfo', 'course_id course_name course_number date status display') # pylint: disable=invalid-name
|
||||
|
||||
|
||||
def csrf_token(context):
|
||||
@@ -1268,7 +1268,7 @@ class AccountValidationError(Exception):
|
||||
|
||||
|
||||
@receiver(post_save, sender=User)
|
||||
def user_signup_handler(sender, **kwargs): # pylint: disable=W0613
|
||||
def user_signup_handler(sender, **kwargs): # pylint: disable=unused-argument
|
||||
"""
|
||||
handler that saves the user Signup Source
|
||||
when the user is created
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# across all lms apps can be put in terrain/common
|
||||
# See https://groups.google.com/forum/?fromgroups=#!msg/lettuce-users/5VyU9B4HcX8/USgbGIJdS5QJ
|
||||
|
||||
from terrain.browser import * # pylint: disable=W0401
|
||||
from terrain.steps import * # pylint: disable=W0401
|
||||
from terrain.factories import * # pylint: disable=W0401
|
||||
from terrain.setup_prereqs import * # pylint: disable=W0401
|
||||
from terrain.browser import * # pylint: disable=wildcard-import
|
||||
from terrain.steps import * # pylint: disable=wildcard-import
|
||||
from terrain.factories import * # pylint: disable=wildcard-import
|
||||
from terrain.setup_prereqs import * # pylint: disable=wildcard-import
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Browser set up for acceptance tests.
|
||||
"""
|
||||
|
||||
# pylint: disable=E1101
|
||||
# pylint: disable=W0613
|
||||
# pylint: disable=no-member
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
from lettuce import before, after, world
|
||||
from splinter.browser import Browser
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
import urllib
|
||||
from lettuce import world
|
||||
|
||||
@@ -36,7 +36,7 @@ YOUTUBE_API_URLS = {
|
||||
}
|
||||
|
||||
|
||||
@before.all # pylint: disable=E1101
|
||||
@before.all # pylint: disable=no-member
|
||||
def start_video_server():
|
||||
"""
|
||||
Serve the HTML5 Video Sources from a local port
|
||||
@@ -47,7 +47,7 @@ def start_video_server():
|
||||
setattr(world, 'video_source', video_server)
|
||||
|
||||
|
||||
@after.all # pylint: disable=E1101
|
||||
@after.all # pylint: disable=no-member
|
||||
def stop_video_server(_total):
|
||||
"""
|
||||
Stop the HTML5 Video Source server after all tests have executed
|
||||
@@ -57,7 +57,7 @@ def stop_video_server(_total):
|
||||
video_server.shutdown()
|
||||
|
||||
|
||||
@before.each_scenario # pylint: disable=E1101
|
||||
@before.each_scenario # pylint: disable=no-member
|
||||
def process_requires_tags(scenario):
|
||||
"""
|
||||
Process the scenario tags to make sure that any
|
||||
@@ -125,7 +125,7 @@ def is_youtube_available(urls):
|
||||
return True
|
||||
|
||||
|
||||
@after.each_scenario # pylint: disable=E1101
|
||||
@after.each_scenario # pylint: disable=no-member
|
||||
def stop_stubs(_scenario):
|
||||
"""
|
||||
Shut down any stub services that were started up for the scenario.
|
||||
@@ -136,7 +136,7 @@ def stop_stubs(_scenario):
|
||||
stub_server.shutdown()
|
||||
|
||||
|
||||
@after.each_scenario # pylint: disable=E1101
|
||||
@after.each_scenario # pylint: disable=no-member
|
||||
def clear_alerts(_scenario):
|
||||
"""
|
||||
Clear any alerts that might still exist, so that
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
# Disable the "wildcard import" warning so we can bring in all methods from
|
||||
# course helpers and ui helpers
|
||||
# pylint: disable=W0401
|
||||
# pylint: disable=wildcard-import
|
||||
|
||||
# Disable the "Unused import %s from wildcard import" warning
|
||||
# pylint: disable=W0614
|
||||
# pylint: disable=unused-wildcard-import
|
||||
|
||||
# Disable the "unused argument" warning because lettuce uses "step"
|
||||
# pylint: disable=W0613
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
# django_url is assigned late in the process of loading lettuce,
|
||||
# so we import this as a module, and then read django_url from
|
||||
@@ -19,7 +19,7 @@ import lettuce.django
|
||||
from lettuce import world, step
|
||||
from .course_helpers import *
|
||||
from .ui_helpers import *
|
||||
from nose.tools import assert_equals # pylint: disable=E0611
|
||||
from nose.tools import assert_equals # pylint: disable=no-name-in-module
|
||||
|
||||
from opaque_keys.edx.locations import SlashSeparatedCourseKey
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user