Commit 65d1d65d authored by Alasdair Nicol's avatar Alasdair Nicol
Browse files

Fixed #21267 -- Fixed E502 pep8 warnings

parent dfb4cb99
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -126,8 +126,8 @@ class CookieTest(BaseTests, TestCase):
        messages = [
            {
                'message': Message(constants.INFO, 'Test message'),
                'message_list': [Message(constants.INFO, 'message %s') \
                                 for x in range(5)] + [{'another-message': \
                'message_list': [Message(constants.INFO, 'message %s')
                                 for x in range(5)] + [{'another-message':
                                 Message(constants.ERROR, 'error')}],
            },
            Message(constants.INFO, 'message %s'),
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ class CurrentSiteManager(models.Manager):

        # If a custom name is provided, make sure the field exists on the model
        if self.__field_name is not None and self.__field_name not in field_names:
            raise ValueError("%s couldn't find a field named %s in %s." % \
            raise ValueError("%s couldn't find a field named %s in %s." %
                (self.__class__.__name__, self.__field_name, self.model._meta.object_name))

        # Otherwise, see if there is a field called either 'site' or 'sites'
@@ -31,7 +31,7 @@ class CurrentSiteManager(models.Manager):
            if not isinstance(field, (models.ForeignKey, models.ManyToManyField)):
                raise TypeError("%s must be a ForeignKey or ManyToManyField." %self.__field_name)
        except FieldDoesNotExist:
            raise ValueError("%s couldn't find a field named %s in %s." % \
            raise ValueError("%s couldn't find a field named %s in %s." %
                    (self.__class__.__name__, self.__field_name, self.model._meta.object_name))
        self.__is_validated = True

+1 −1
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ class ManagementUtility(object):
        try:
            app_name = commands[subcommand]
        except KeyError:
            sys.stderr.write("Unknown command: %r\nType '%s help' for usage.\n" % \
            sys.stderr.write("Unknown command: %r\nType '%s help' for usage.\n" %
                (subcommand, self.prog_name))
            sys.exit(1)
        if isinstance(app_name, BaseCommand):
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ class Command(BaseCommand):
                field_output.append("UNIQUE")
            if f.db_index:
                unique = "UNIQUE " if f.unique else ""
                index_output.append("CREATE %sINDEX %s ON %s (%s);" % \
                index_output.append("CREATE %sINDEX %s ON %s (%s);" %
                    (unique, qn('%s_%s' % (tablename, f.name)), qn(tablename),
                    qn(f.name)))
            table_output.append(" ".join(field_output))
+1 −1
Original line number Diff line number Diff line
@@ -24,5 +24,5 @@ class Command(BaseCommand):
            # isn't installed. There's a possibility OSError would be raised
            # for some other reason, in which case this error message would be
            # inaccurate. Still, this message catches the common case.
            raise CommandError('You appear not to have the %r program installed or on your path.' % \
            raise CommandError('You appear not to have the %r program installed or on your path.' %
                connection.client.executable_name)
Loading