Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2e1400f8
Commit
2e1400f8
authored
Feb 16, 2015
by
stv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Pylint: W0613(unused-argument)
parent
416f7090
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
13 deletions
+13
-13
common/lib/xmodule/xmodule/modulestore/xml.py
+1
-1
lms/djangoapps/bulk_email/tasks.py
+2
-2
lms/djangoapps/circuit/views.py
+1
-1
lms/djangoapps/courseware/access.py
+2
-2
lms/djangoapps/courseware/management/commands/clean_xml.py
+1
-1
lms/djangoapps/courseware/middleware.py
+1
-1
lms/djangoapps/courseware/tests/test_access.py
+3
-3
lms/djangoapps/courseware/views.py
+1
-1
lms/djangoapps/notes/api.py
+1
-1
No files found.
common/lib/xmodule/xmodule/modulestore/xml.py
View file @
2e1400f8
...
...
@@ -706,7 +706,7 @@ class XMLModuleStore(ModuleStoreReadBase):
"""
return
CourseLocator
(
org
,
course
,
run
,
deprecated
=
True
)
def
get_courses
(
self
,
depth
=
0
,
**
kwargs
):
def
get_courses
(
self
,
**
kwargs
):
"""
Returns a list of course descriptors. If there were errors on loading,
some of these may be ErrorDescriptors instead.
...
...
lms/djangoapps/bulk_email/tasks.py
View file @
2e1400f8
...
...
@@ -92,7 +92,7 @@ BULK_EMAIL_FAILURE_ERRORS = (
)
def
_get_recipient_queryset
(
user_id
,
to_option
,
course_id
,
course_location
):
def
_get_recipient_queryset
(
user_id
,
to_option
,
course_id
):
"""
Returns a query set of email recipients corresponding to the requested to_option category.
...
...
@@ -230,7 +230,7 @@ def perform_delegate_email_batches(entry_id, course_id, task_input, action_name)
)
return
new_subtask
recipient_qset
=
_get_recipient_queryset
(
user_id
,
to_option
,
course_id
,
course
.
location
)
recipient_qset
=
_get_recipient_queryset
(
user_id
,
to_option
,
course_id
)
recipient_fields
=
[
'profile__name'
,
'email'
]
log
.
info
(
u"Task
%
s: Preparing to queue subtasks for sending emails for course
%
s, email
%
s, to_option
%
s"
,
...
...
lms/djangoapps/circuit/views.py
View file @
2e1400f8
...
...
@@ -31,7 +31,7 @@ def circuit_line(circuit):
return
xml
.
etree
.
ElementTree
.
tostring
(
circuit_line
)
def
edit_circuit
(
request
,
circuit
):
def
edit_circuit
(
_
request
,
circuit
):
try
:
sc
=
ServerCircuit
.
objects
.
get
(
name
=
circuit
)
except
:
...
...
lms/djangoapps/courseware/access.py
View file @
2e1400f8
...
...
@@ -96,7 +96,7 @@ def has_access(user, action, obj, course_key=None):
return
_has_access_location
(
user
,
action
,
obj
,
course_key
)
if
isinstance
(
obj
,
basestring
):
return
_has_access_string
(
user
,
action
,
obj
,
course_key
)
return
_has_access_string
(
user
,
action
,
obj
)
# Passing an unknown object here is a coding error, so rather than
# returning a default, complain.
...
...
@@ -487,7 +487,7 @@ def _has_access_course_key(user, action, course_key):
return
_dispatch
(
checkers
,
action
,
user
,
course_key
)
def
_has_access_string
(
user
,
action
,
perm
,
course_key
):
def
_has_access_string
(
user
,
action
,
perm
):
"""
Check if user has certain special access, specified as string. Valid strings:
...
...
lms/djangoapps/courseware/management/commands/clean_xml.py
View file @
2e1400f8
...
...
@@ -45,7 +45,7 @@ def export(course, export_dir):
return
False
def
import_with_checks
(
course_dir
,
verbose
=
True
):
def
import_with_checks
(
course_dir
):
all_ok
=
True
print
"Attempting to load '{0}'"
.
format
(
course_dir
)
...
...
lms/djangoapps/courseware/middleware.py
View file @
2e1400f8
...
...
@@ -13,7 +13,7 @@ class RedirectUnenrolledMiddleware(object):
Catch UserNotEnrolled errors thrown by `get_course_with_access` and redirect
users to the course about page
"""
def
process_exception
(
self
,
request
,
exception
):
def
process_exception
(
self
,
_
request
,
exception
):
if
isinstance
(
exception
,
UserNotEnrolled
):
course_key
=
exception
.
course_key
return
redirect
(
...
...
lms/djangoapps/courseware/tests/test_access.py
View file @
2e1400f8
...
...
@@ -88,12 +88,12 @@ class AccessTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
def
test__has_access_string
(
self
):
user
=
Mock
(
is_staff
=
True
)
self
.
assertFalse
(
access
.
_has_access_string
(
user
,
'staff'
,
'not_global'
,
self
.
course
.
course_key
))
self
.
assertFalse
(
access
.
_has_access_string
(
user
,
'staff'
,
'not_global'
))
user
.
_has_global_staff_access
.
return_value
=
True
self
.
assertTrue
(
access
.
_has_access_string
(
user
,
'staff'
,
'global'
,
self
.
course
.
course_key
))
self
.
assertTrue
(
access
.
_has_access_string
(
user
,
'staff'
,
'global'
))
self
.
assertRaises
(
ValueError
,
access
.
_has_access_string
,
user
,
'not_staff'
,
'global'
,
self
.
course
.
course_key
)
self
.
assertRaises
(
ValueError
,
access
.
_has_access_string
,
user
,
'not_staff'
,
'global'
)
def
test__has_access_error_desc
(
self
):
descriptor
=
Mock
()
...
...
lms/djangoapps/courseware/views.py
View file @
2e1400f8
...
...
@@ -584,7 +584,7 @@ def jump_to_id(request, course_id, module_id):
@ensure_csrf_cookie
def
jump_to
(
request
,
course_id
,
location
):
def
jump_to
(
_
request
,
course_id
,
location
):
"""
Show the page that contains a specific location.
...
...
lms/djangoapps/notes/api.py
View file @
2e1400f8
...
...
@@ -148,7 +148,7 @@ def create(request, course_key):
return
ApiResponse
(
http_response
=
response
,
data
=
None
)
def
read
(
request
,
course_key
,
note_id
):
# pylint: disable=unused-argument (course_key)
def
read
(
request
,
_course_key
,
note_id
):
'''
Returns a single annotation object.
'''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment