From 2ca5fc55b0a0b18ce4f060ee999ef355b5ceb0a3 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 14 Jun 2014 10:20:42 -0400 Subject: [PATCH] Fixed several flake8 errors --- django/core/management/commands/squashmigrations.py | 2 -- tests/admin_scripts/management/commands/base_command.py | 6 +++--- tests/user_commands/management/commands/optparse_cmd.py | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/django/core/management/commands/squashmigrations.py b/django/core/management/commands/squashmigrations.py index 53e094a01b..7e559f1a76 100644 --- a/django/core/management/commands/squashmigrations.py +++ b/django/core/management/commands/squashmigrations.py @@ -1,5 +1,3 @@ -import sys - from django.core.management.base import BaseCommand, CommandError from django.utils import six from django.db import connections, DEFAULT_DB_ALIAS, migrations diff --git a/tests/admin_scripts/management/commands/base_command.py b/tests/admin_scripts/management/commands/base_command.py index 14e9152d9d..56ab664f8a 100644 --- a/tests/admin_scripts/management/commands/base_command.py +++ b/tests/admin_scripts/management/commands/base_command.py @@ -7,9 +7,9 @@ class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', nargs='*') - parser.add_argument('--option_a', '-a', default='1') - parser.add_argument('--option_b', '-b', default='2') - parser.add_argument('--option_c', '-c', default='3') + parser.add_argument('--option_a', '-a', default='1') + parser.add_argument('--option_b', '-b', default='2') + parser.add_argument('--option_c', '-c', default='3') def handle(self, *labels, **options): print('EXECUTE:BaseCommand labels=%s, options=%s' % (labels, sorted(options.items()))) diff --git a/tests/user_commands/management/commands/optparse_cmd.py b/tests/user_commands/management/commands/optparse_cmd.py index 0c241fcb14..b92e90ee31 100644 --- a/tests/user_commands/management/commands/optparse_cmd.py +++ b/tests/user_commands/management/commands/optparse_cmd.py @@ -1,6 +1,6 @@ from optparse import make_option -from django.core.management.base import BaseCommand, CommandError +from django.core.management.base import BaseCommand class Command(BaseCommand): @@ -13,7 +13,7 @@ class Command(BaseCommand): ) def handle(self, *args, **options): - example = options["example"] + options["example"] # BaseCommand default option is available options['verbosity'] self.stdout.write("All right, let's dance %s." % options["style"])