зеркало из https://github.com/mozilla/bedrock.git
Add lib to flake8 run and fix pep8 issues.
Remove schematic files.
This commit is contained in:
Родитель
f1347ee075
Коммит
af82ffd059
|
@ -68,7 +68,7 @@ echo "Update product_details"
|
|||
./manage.py update_product_details
|
||||
|
||||
echo "Check PEP-8"
|
||||
flake8 bedrock
|
||||
flake8 bedrock lib
|
||||
|
||||
echo "Starting tests..."
|
||||
export FORCE_DB=1
|
||||
|
|
|
@ -9,6 +9,7 @@ from django.conf import settings
|
|||
|
||||
from lib.l10n_utils.gettext import merge_lang_files
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
args = ''
|
||||
help = 'Merges gettext strings into .lang files'
|
||||
|
@ -19,6 +20,6 @@ class Command(BaseCommand):
|
|||
else:
|
||||
langs = os.listdir(os.path.join(settings.ROOT, 'locale'))
|
||||
langs = filter(lambda x: x != 'templates', langs)
|
||||
langs = filter(lambda x: x[0] != '.' , langs)
|
||||
langs = filter(lambda x: x[0] != '.', langs)
|
||||
|
||||
merge_lang_files(langs)
|
||||
|
|
|
@ -12,5 +12,6 @@ LANG_FILES = [
|
|||
'walter',
|
||||
]
|
||||
|
||||
|
||||
def do_translate():
|
||||
return _(u"I'm The Dude, so that's what you call me, man.")
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
# Set up playdoh.
|
||||
import manage
|
||||
from django.conf import settings
|
||||
|
||||
config = settings.DATABASES['default']
|
||||
config['HOST'] = config.get('HOST', 'localhost')
|
||||
config['PORT'] = config.get('PORT', '3306')
|
||||
|
||||
if not config['HOST'] or config['HOST'].endswith('.sock'):
|
||||
"""Oh, you meant 'localhost'!"""
|
||||
config['HOST'] = 'localhost'
|
||||
|
||||
s = 'mysql --silent {NAME} -h{HOST} -u{USER}'
|
||||
|
||||
if config['PASSWORD']:
|
||||
s += ' -p{PASSWORD}'
|
||||
else:
|
||||
del config['PASSWORD']
|
||||
if config['PORT']:
|
||||
s += ' -P{PORT}'
|
||||
else:
|
||||
del config['PORT']
|
||||
|
||||
db = s.format(**config)
|
||||
table = 'schema_version'
|
Загрузка…
Ссылка в новой задаче