Commit ee0f4b25 by Ned Batchelder

Remove 'pylint: disable=no-value-for-parameter' that we no longer need.

parent 52acdae6
...@@ -76,7 +76,7 @@ def see_a_problem_component(step, category): ...@@ -76,7 +76,7 @@ def see_a_problem_component(step, category):
problem_css = 'li.studio-xblock-wrapper div.xblock-student_view' problem_css = 'li.studio-xblock-wrapper div.xblock-student_view'
# This view presents the given problem component in uppercase. Assert that the text matches # This view presents the given problem component in uppercase. Assert that the text matches
# the component selected (in uppercase) # the component selected (in uppercase)
assert_true(world.css_contains_text(problem_css, category.upper())) # pylint: disable=no-value-for-parameter assert_true(world.css_contains_text(problem_css, category.upper()))
@step(u'I add a "([^"]*)" "([^"]*)" component$') @step(u'I add a "([^"]*)" "([^"]*)" component$')
......
...@@ -26,7 +26,7 @@ from path import path ...@@ -26,7 +26,7 @@ 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=no-value-for-parameter os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname()
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import
...@@ -36,7 +36,7 @@ from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import ...@@ -36,7 +36,7 @@ from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import
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 = REPO_ROOT / "test_root" # pylint: disable=no-value-for-parameter TEST_ROOT = REPO_ROOT / "test_root"
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()
DATA_DIR = TEST_ROOT / "data" DATA_DIR = TEST_ROOT / "data"
...@@ -45,7 +45,7 @@ DATA_DIR = TEST_ROOT / "data" ...@@ -45,7 +45,7 @@ DATA_DIR = TEST_ROOT / "data"
update_module_store_settings( update_module_store_settings(
MODULESTORE, MODULESTORE,
module_store_options={ module_store_options={
'fs_root': (TEST_ROOT / "data").abspath(), # pylint: disable=no-value-for-parameter 'fs_root': (TEST_ROOT / "data").abspath(),
}, },
xml_store_options={ xml_store_options={
'data_dir': (TEST_ROOT / "data").abspath(), 'data_dir': (TEST_ROOT / "data").abspath(),
...@@ -112,7 +112,7 @@ FEATURES['ENABLE_LIBRARY_INDEX'] = True ...@@ -112,7 +112,7 @@ FEATURES['ENABLE_LIBRARY_INDEX'] = True
SEARCH_ENGINE = "search.tests.mock_search_engine.MockSearchEngine" SEARCH_ENGINE = "search.tests.mock_search_engine.MockSearchEngine"
# Path at which to store the mock index # Path at which to store the mock index
MOCK_SEARCH_BACKING_FILE = ( MOCK_SEARCH_BACKING_FILE = (
TEST_ROOT / "index_file.dat" # pylint: disable=no-value-for-parameter TEST_ROOT / "index_file.dat"
).abspath() ).abspath()
# Generate a random UUID so that different runs of acceptance tests don't break each other # Generate a random UUID so that different runs of acceptance tests don't break each other
......
...@@ -22,7 +22,7 @@ invoked each time that changes have been made. ...@@ -22,7 +22,7 @@ invoked each time that changes have been made.
from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import
TEST_ROOT = REPO_ROOT / "test_root" # pylint: disable=no-value-for-parameter TEST_ROOT = REPO_ROOT / "test_root"
############################ STATIC FILES ############################# ############################ STATIC FILES #############################
......
...@@ -23,7 +23,7 @@ DATABASES = { ...@@ -23,7 +23,7 @@ DATABASES = {
######################### Static file overrides #################################### ######################### Static file overrides ####################################
# Redirect to the test_root folder within the repo # Redirect to the test_root folder within the repo
TEST_ROOT = REPO_ROOT / "test_root" # pylint: disable=no-value-for-parameter TEST_ROOT = REPO_ROOT / "test_root"
LOG_DIR = (TEST_ROOT / "log").abspath() LOG_DIR = (TEST_ROOT / "log").abspath()
# Store the static files under test root so that they don't overwrite existing static assets # Store the static files under test root so that they don't overwrite existing static assets
......
...@@ -6,7 +6,7 @@ from course_modes import views ...@@ -6,7 +6,7 @@ from course_modes import views
urlpatterns = patterns( urlpatterns = patterns(
'', '',
# pylint seems to dislike as_view() calls because it's a `classonlymethod` instead of `classmethod`, so we disable the warning # pylint seems to dislike as_view() calls because it's a `classonlymethod` instead of `classmethod`, so we disable the warning
url(r'^choose/{}/$'.format(settings.COURSE_ID_PATTERN), views.ChooseModeView.as_view(), name='course_modes_choose'), # pylint: disable=no-value-for-parameter url(r'^choose/{}/$'.format(settings.COURSE_ID_PATTERN), views.ChooseModeView.as_view(), name='course_modes_choose'),
) )
# Enable verified mode creation # Enable verified mode creation
......
...@@ -217,7 +217,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase): ...@@ -217,7 +217,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase):
# When we fix the caching issue, we should reduce this # When we fix the caching issue, we should reduce this
# to 6 and remove the 'treexport_peer_component' course_id # to 6 and remove the 'treexport_peer_component' course_id
# from the list below # from the list below
assert_equals(len(courses), 7) # pylint: disable=no-value-for-parameter assert_equals(len(courses), 7)
course_ids = [course.id for course in courses] course_ids = [course.id for course in courses]
for course_key in [ for course_key in [
...@@ -252,7 +252,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase): ...@@ -252,7 +252,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase):
""" """
courses = self.draft_store.get_courses(org='guestx') courses = self.draft_store.get_courses(org='guestx')
assert_equals(len(courses), 1) # pylint: disable=no-value-for-parameter assert_equals(len(courses), 1)
course_ids = [course.id for course in courses] course_ids = [course.id for course in courses]
for course_key in [ for course_key in [
...@@ -261,7 +261,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase): ...@@ -261,7 +261,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase):
['guestx', 'foo', 'bar'] ['guestx', 'foo', 'bar']
] ]
]: ]:
assert_in(course_key, course_ids) # pylint: disable=no-value-for-parameter assert_in(course_key, course_ids)
courses = self.draft_store.get_courses(org='edX') courses = self.draft_store.get_courses(org='edX')
# note, the number of courses expected is really # note, the number of courses expected is really
...@@ -270,7 +270,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase): ...@@ -270,7 +270,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase):
# When we fix the caching issue, we should reduce this # When we fix the caching issue, we should reduce this
# to 6 and remove the 'treexport_peer_component' course_id # to 6 and remove the 'treexport_peer_component' course_id
# from the list below # from the list below
assert_equals(len(courses), 6) # pylint: disable=no-value-for-parameter assert_equals(len(courses), 6)
course_ids = [course.id for course in courses] course_ids = [course.id for course in courses]
for course_key in [ for course_key in [
...@@ -286,7 +286,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase): ...@@ -286,7 +286,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase):
['edX', 'treeexport_peer_component', 'export_peer_component'], ['edX', 'treeexport_peer_component', 'export_peer_component'],
] ]
]: ]:
assert_in(course_key, course_ids) # pylint: disable=no-value-for-parameter assert_in(course_key, course_ids)
def test_no_such_course(self): def test_no_such_course(self):
""" """
......
...@@ -90,7 +90,7 @@ def load_data_str(rel_path): ...@@ -90,7 +90,7 @@ def load_data_str(rel_path):
Load a file from the "data" directory as a string. Load a file from the "data" directory as a string.
`rel_path` is the path relative to the data directory. `rel_path` is the path relative to the data directory.
""" """
full_path = path(__file__).abspath().dirname() / "data" / rel_path # pylint: disable=no-value-for-parameter full_path = path(__file__).abspath().dirname() / "data" / rel_path
with open(full_path) as data_file: with open(full_path) as data_file:
return data_file.read() return data_file.read()
......
...@@ -277,7 +277,7 @@ def check_lti_popup(parent_window): ...@@ -277,7 +277,7 @@ def check_lti_popup(parent_window):
for window in windows: for window in windows:
world.browser.switch_to_window(window) world.browser.switch_to_window(window)
tabs.append(world.browser.title) tabs.append(world.browser.title)
assert_equal(tabs, expected_tabs) # pylint: disable=no-value-for-parameter assert_equal(tabs, expected_tabs)
# Now verify the contents of the LTI window (which is the 2nd window/tab) # Now verify the contents of the LTI window (which is the 2nd window/tab)
# Note: The LTI opens in a new browser window, but Selenium sticks with the # Note: The LTI opens in a new browser window, but Selenium sticks with the
......
""" """
Urls for sysadmin dashboard feature Urls for sysadmin dashboard feature
""" """
# pylint: disable=no-value-for-parameter
from django.conf.urls import patterns, url from django.conf.urls import patterns, url
......
...@@ -16,7 +16,7 @@ urlpatterns = patterns( ...@@ -16,7 +16,7 @@ urlpatterns = patterns(
r'^start-flow/{course}/$'.format(course=settings.COURSE_ID_PATTERN), r'^start-flow/{course}/$'.format(course=settings.COURSE_ID_PATTERN),
# Pylint seems to dislike the as_view() method because as_view() is # Pylint seems to dislike the as_view() method because as_view() is
# decorated with `classonlymethod` instead of `classmethod`. # decorated with `classonlymethod` instead of `classmethod`.
views.PayAndVerifyView.as_view(), # pylint: disable=no-value-for-parameter views.PayAndVerifyView.as_view(),
name="verify_student_start_flow", name="verify_student_start_flow",
kwargs={ kwargs={
'message': views.PayAndVerifyView.FIRST_TIME_VERIFY_MSG 'message': views.PayAndVerifyView.FIRST_TIME_VERIFY_MSG
...@@ -28,7 +28,7 @@ urlpatterns = patterns( ...@@ -28,7 +28,7 @@ urlpatterns = patterns(
# except with slight messaging changes. # except with slight messaging changes.
url( url(
r'^upgrade/{course}/$'.format(course=settings.COURSE_ID_PATTERN), r'^upgrade/{course}/$'.format(course=settings.COURSE_ID_PATTERN),
views.PayAndVerifyView.as_view(), # pylint: disable=no-value-for-parameter views.PayAndVerifyView.as_view(),
name="verify_student_upgrade_and_verify", name="verify_student_upgrade_and_verify",
kwargs={ kwargs={
'message': views.PayAndVerifyView.UPGRADE_MSG 'message': views.PayAndVerifyView.UPGRADE_MSG
...@@ -43,7 +43,7 @@ urlpatterns = patterns( ...@@ -43,7 +43,7 @@ urlpatterns = patterns(
# to the dashboard. # to the dashboard.
url( url(
r'^verify-now/{course}/$'.format(course=settings.COURSE_ID_PATTERN), r'^verify-now/{course}/$'.format(course=settings.COURSE_ID_PATTERN),
views.PayAndVerifyView.as_view(), # pylint: disable=no-value-for-parameter views.PayAndVerifyView.as_view(),
name="verify_student_verify_now", name="verify_student_verify_now",
kwargs={ kwargs={
'always_show_payment': True, 'always_show_payment': True,
...@@ -59,7 +59,7 @@ urlpatterns = patterns( ...@@ -59,7 +59,7 @@ urlpatterns = patterns(
# (since the user already paid). # (since the user already paid).
url( url(
r'^verify-later/{course}/$'.format(course=settings.COURSE_ID_PATTERN), r'^verify-later/{course}/$'.format(course=settings.COURSE_ID_PATTERN),
views.VerifyLaterView.as_view(), # pylint: disable=no-value-for-parameter views.VerifyLaterView.as_view(),
name="verify_student_verify_later" name="verify_student_verify_later"
), ),
...@@ -68,7 +68,7 @@ urlpatterns = patterns( ...@@ -68,7 +68,7 @@ urlpatterns = patterns(
# once the order has been fulfilled. # once the order has been fulfilled.
url( url(
r'^payment-confirmation/{course}/$'.format(course=settings.COURSE_ID_PATTERN), r'^payment-confirmation/{course}/$'.format(course=settings.COURSE_ID_PATTERN),
views.PayAndVerifyView.as_view(), # pylint: disable=no-value-for-parameter views.PayAndVerifyView.as_view(),
name="verify_student_payment_confirmation", name="verify_student_payment_confirmation",
kwargs={ kwargs={
'always_show_payment': True, 'always_show_payment': True,
......
...@@ -19,7 +19,7 @@ from tempfile import mkdtemp ...@@ -19,7 +19,7 @@ from tempfile import mkdtemp
# and throws spurious errors. Therefore, we disable invalid-name checking. # and throws spurious errors. Therefore, we disable invalid-name checking.
# pylint: disable=invalid-name # pylint: disable=invalid-name
CONFIG_ROOT = path(__file__).abspath().dirname() # pylint: disable=no-value-for-parameter CONFIG_ROOT = path(__file__).abspath().dirname()
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root"
########################## Prod-like settings ################################### ########################## Prod-like settings ###################################
...@@ -47,7 +47,7 @@ LOG_DIR = (TEST_ROOT / "log").abspath() ...@@ -47,7 +47,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=no-value-for-parameter 'fs_root': (TEST_ROOT / "data").abspath(),
}, },
xml_store_options={ xml_store_options={
'data_dir': (TEST_ROOT / "data").abspath(), 'data_dir': (TEST_ROOT / "data").abspath(),
...@@ -161,7 +161,7 @@ FEATURES['ENABLE_DASHBOARD_SEARCH'] = True ...@@ -161,7 +161,7 @@ FEATURES['ENABLE_DASHBOARD_SEARCH'] = True
SEARCH_ENGINE = "search.tests.mock_search_engine.MockSearchEngine" SEARCH_ENGINE = "search.tests.mock_search_engine.MockSearchEngine"
# Path at which to store the mock index # Path at which to store the mock index
MOCK_SEARCH_BACKING_FILE = ( MOCK_SEARCH_BACKING_FILE = (
TEST_ROOT / "index_file.dat" # pylint: disable=no-value-for-parameter TEST_ROOT / "index_file.dat"
).abspath() ).abspath()
# Generate a random UUID so that different runs of acceptance tests don't break each other # Generate a random UUID so that different runs of acceptance tests don't break each other
......
...@@ -22,7 +22,7 @@ invoked each time that changes have been made. ...@@ -22,7 +22,7 @@ invoked each time that changes have been made.
from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import
TEST_ROOT = REPO_ROOT / "test_root" # pylint: disable=no-value-for-parameter TEST_ROOT = REPO_ROOT / "test_root"
############################ STATIC FILES ############################# ############################ STATIC FILES #############################
......
...@@ -35,7 +35,7 @@ XQUEUE_INTERFACE = { ...@@ -35,7 +35,7 @@ XQUEUE_INTERFACE = {
######################### Static file overrides #################################### ######################### Static file overrides ####################################
# Redirect to the test_root folder within the repo # Redirect to the test_root folder within the repo
TEST_ROOT = REPO_ROOT / "test_root" # pylint: disable=no-value-for-parameter TEST_ROOT = REPO_ROOT / "test_root"
LOG_DIR = (TEST_ROOT / "log").abspath() LOG_DIR = (TEST_ROOT / "log").abspath()
# Store the static files under test root so that they don't overwrite existing static assets # Store the static files under test root so that they don't overwrite existing static assets
......
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