Commit 50fd8f6d by Sarina Canelake

Merge pull request #6090 from edx/sarina/pylint-cleanup

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