Fixed several flake8 errors
This commit is contained in:
parent
f17b24e407
commit
2ca5fc55b0
|
@ -1,5 +1,3 @@
|
||||||
import sys
|
|
||||||
|
|
||||||
from django.core.management.base import BaseCommand, CommandError
|
from django.core.management.base import BaseCommand, CommandError
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from django.db import connections, DEFAULT_DB_ALIAS, migrations
|
from django.db import connections, DEFAULT_DB_ALIAS, migrations
|
||||||
|
|
|
@ -7,9 +7,9 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
def add_arguments(self, parser):
|
def add_arguments(self, parser):
|
||||||
parser.add_argument('args', nargs='*')
|
parser.add_argument('args', nargs='*')
|
||||||
parser.add_argument('--option_a', '-a', default='1')
|
parser.add_argument('--option_a', '-a', default='1')
|
||||||
parser.add_argument('--option_b', '-b', default='2')
|
parser.add_argument('--option_b', '-b', default='2')
|
||||||
parser.add_argument('--option_c', '-c', default='3')
|
parser.add_argument('--option_c', '-c', default='3')
|
||||||
|
|
||||||
def handle(self, *labels, **options):
|
def handle(self, *labels, **options):
|
||||||
print('EXECUTE:BaseCommand labels=%s, options=%s' % (labels, sorted(options.items())))
|
print('EXECUTE:BaseCommand labels=%s, options=%s' % (labels, sorted(options.items())))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from optparse import make_option
|
from optparse import make_option
|
||||||
|
|
||||||
from django.core.management.base import BaseCommand, CommandError
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
|
@ -13,7 +13,7 @@ class Command(BaseCommand):
|
||||||
)
|
)
|
||||||
|
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
example = options["example"]
|
options["example"]
|
||||||
# BaseCommand default option is available
|
# BaseCommand default option is available
|
||||||
options['verbosity']
|
options['verbosity']
|
||||||
self.stdout.write("All right, let's dance %s." % options["style"])
|
self.stdout.write("All right, let's dance %s." % options["style"])
|
||||||
|
|
Loading…
Reference in New Issue