Commit 55de42d1 by stv

Fix PEP8: E122 continuation line missing

indentation or outdented
parent dff5772c
...@@ -7,8 +7,7 @@ from django.core.cache import get_cache ...@@ -7,8 +7,7 @@ from django.core.cache import get_cache
class Command(NoArgsCommand): class Command(NoArgsCommand):
help = \ help = 'Import the specified data directory into the default ModuleStore'
'''Import the specified data directory into the default ModuleStore'''
def handle_noargs(self, **options): def handle_noargs(self, **options):
staticfiles_cache = get_cache('staticfiles') staticfiles_cache = get_cache('staticfiles')
......
...@@ -18,14 +18,13 @@ from student.models import UserProfile ...@@ -18,14 +18,13 @@ from student.models import UserProfile
class Command(BaseCommand): class Command(BaseCommand):
help = \ help = """Exports all users and user profiles.
'''Exports all users and user profiles.
Caveat: Should be looked over before any run Caveat: Should be looked over before any run
for schema changes. for schema changes.
Current version grabs user_keys from Current version grabs user_keys from
django.contrib.auth.models.User and up_keys django.contrib.auth.models.User and up_keys
from student.userprofile. ''' from student.userprofile."""
def handle(self, *args, **options): def handle(self, *args, **options):
users = list(User.objects.all()) users = list(User.objects.all())
......
...@@ -39,14 +39,13 @@ def import_user(u): ...@@ -39,14 +39,13 @@ def import_user(u):
class Command(BaseCommand): class Command(BaseCommand):
help = \ help = """Exports all users and user profiles.
'''Exports all users and user profiles.
Caveat: Should be looked over before any run Caveat: Should be looked over before any run
for schema changes. for schema changes.
Current version grabs user_keys from Current version grabs user_keys from
django.contrib.auth.models.User and up_keys django.contrib.auth.models.User and up_keys
from student.userprofile. ''' from student.userprofile."""
def handle(self, *args, **options): def handle(self, *args, **options):
extracted = json.load(open('transfer_users.txt')) extracted = json.load(open('transfer_users.txt'))
......
...@@ -6,6 +6,7 @@ from student.models import UserTestGroup ...@@ -6,6 +6,7 @@ from student.models import UserTestGroup
import random import random
import sys import sys
import datetime import datetime
from textwrap import dedent
import json import json
from pytz import UTC from pytz import UTC
...@@ -25,16 +26,15 @@ def group_from_value(groups, v): ...@@ -25,16 +26,15 @@ def group_from_value(groups, v):
class Command(BaseCommand): class Command(BaseCommand):
help = \ help = dedent("""\
''' Assign users to test groups. Takes a list Assign users to test groups. Takes a list of groups:
of groups: a:0.3,b:0.4,c:0.3 file.txt "Testing something"
a:0.3,b:0.4,c:0.3 file.txt "Testing something" Will assign each user to group a, b, or c with
Will assign each user to group a, b, or c with probability 0.3, 0.4, 0.3. Probabilities must
probability 0.3, 0.4, 0.3. Probabilities must add up to 1.
add up to 1.
Will log what happened to file.txt.
Will log what happened to file.txt. """)
'''
def handle(self, *args, **options): def handle(self, *args, **options):
if len(args) != 3: if len(args) != 3:
......
...@@ -3,8 +3,7 @@ from django.contrib.auth.models import User ...@@ -3,8 +3,7 @@ from django.contrib.auth.models import User
class Command(BaseCommand): class Command(BaseCommand):
help = \ help = 'Extract an e-mail list of all active students.'
''' Extract an e-mail list of all active students. '''
def handle(self, *args, **options): def handle(self, *args, **options):
#text = open(args[0]).read() #text = open(args[0]).read()
......
...@@ -8,10 +8,7 @@ import lms.lib.comment_client as cc ...@@ -8,10 +8,7 @@ import lms.lib.comment_client as cc
class Command(BaseCommand): class Command(BaseCommand):
help = \ help = 'Sync all user ids, usernames, and emails to the discussion service'
'''
Sync all user ids, usernames, and emails to the discussion
service'''
def handle(self, *args, **options): def handle(self, *args, **options):
for user in User.objects.all().iterator(): for user in User.objects.all().iterator():
......
...@@ -7,9 +7,8 @@ from student.models import UserProfile ...@@ -7,9 +7,8 @@ from student.models import UserProfile
class Command(BaseCommand): class Command(BaseCommand):
help = \ help = """Extract full user information into a JSON file.
''' Extract full user information into a JSON file. Pass a single filename."""
Pass a single filename.'''
def handle(self, *args, **options): def handle(self, *args, **options):
f = open(args[0], 'w') f = open(args[0], 'w')
......
...@@ -15,9 +15,10 @@ _ = lambda text: text ...@@ -15,9 +15,10 @@ _ = lambda text: text
class AnnotatableFields(object): class AnnotatableFields(object):
data = String(help=_("XML data for the annotation"), scope=Scope.content, data = String(
default=textwrap.dedent( help=_("XML data for the annotation"),
"""\ scope=Scope.content,
default=textwrap.dedent("""
<annotatable> <annotatable>
<instructions> <instructions>
<p>Enter your (optional) instructions for the exercise in HTML format.</p> <p>Enter your (optional) instructions for the exercise in HTML format.</p>
......
...@@ -23,9 +23,12 @@ class MakoModuleDescriptor(XModuleDescriptor): ...@@ -23,9 +23,12 @@ class MakoModuleDescriptor(XModuleDescriptor):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(MakoModuleDescriptor, self).__init__(*args, **kwargs) super(MakoModuleDescriptor, self).__init__(*args, **kwargs)
if getattr(self.runtime, 'render_template', None) is None: if getattr(self.runtime, 'render_template', None) is None:
raise TypeError('{runtime} must have a render_template function' raise TypeError(
' in order to use a MakoDescriptor'.format( '{runtime} must have a render_template function'
runtime=self.runtime)) ' in order to use a MakoDescriptor'.format(
runtime=self.runtime,
)
)
def get_context(self): def get_context(self):
""" """
......
...@@ -196,14 +196,14 @@ htmlhelp_basename = 'edxdoc' ...@@ -196,14 +196,14 @@ htmlhelp_basename = 'edxdoc'
# -- Options for LaTeX output -------------------------------------------------- # -- Options for LaTeX output --------------------------------------------------
latex_elements = { latex_elements = {
# The paper size ('letterpaper' or 'a4paper'). # The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper', #'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt'). # The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt', #'pointsize': '10pt',
# Additional stuff for the LaTeX preamble. # Additional stuff for the LaTeX preamble.
#'preamble': '', #'preamble': '',
} }
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
......
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