Commit b9ed4b65 by stv

Fix Pylint: E1305(too-many-format-args)

parent 83fec5d0
......@@ -161,7 +161,9 @@ def export_to_git(course_id, repo, user='', rdir=None):
ident = GIT_EXPORT_DEFAULT_IDENT
time_stamp = timezone.now()
cwd = os.path.abspath(rdirp)
commit_msg = 'Export from Studio at {1}'.format(user, time_stamp)
commit_msg = "Export from Studio at {time_stamp}".format(
time_stamp=time_stamp,
)
try:
cmd_log(['git', 'config', 'user.email', ident['email']], cwd)
cmd_log(['git', 'config', 'user.name', ident['name']], cwd)
......
......@@ -40,7 +40,12 @@ class Command(BaseCommand):
try:
user = user_from_str(args[1])
except User.DoesNotExist:
raise CommandError("No user {} found: expected args are ".format(args[1], self.args))
raise CommandError(
"No user {user} found: expected args are {args}".format(
user=args[1],
args=self.args,
),
)
org = args[2]
course = args[3]
......
......@@ -50,8 +50,11 @@ class DuplicateItemError(Exception):
"""
Print info about what's duplicated
"""
return '{0.store}[{0.collection}] already has {0.element_id}'.format(
self, Exception.__str__(self, *args, **kwargs)
return "{store}[{collection}] already has {element_id} ({exception})".format(
store=self.store,
collection=self.collection,
element_id=self.element_id,
exception=Exception.__str__(self, *args, **kwargs),
)
......
......@@ -184,7 +184,10 @@ class CommandTest(ModuleStoreTestCase):
software_count = CourseSoftware.objects.all().count()
self.assertEqual(2, software_count)
log.debug('Now we should have 3 sets of 20 serials'.format(size))
log.debug(
"Now we should have 3 sets of %s serials",
size,
)
licenses_count = UserLicense.objects.all().count()
self.assertEqual(3 * size, licenses_count)
......
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