Fix flake8 errors outside src/

This commit is contained in:
Andreas Wagner 2019-03-04 16:01:00 +01:00
Родитель 1304a5958e
Коммит bd3500a392
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: A225F31689BE06A1
3 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -51,8 +51,8 @@ def extract_translations_for_given_locale(all_translations, locale):
def main():
if not os.path.isdir('locale'):
print ('Sorry, please run from the root of the project, '
'eg. ./locale/generate_category_po_files.py')
print('Sorry, please run from the root of the project, '
'eg. ./locale/generate_category_po_files.py')
return
print('Loading translations JSON dump...')

Просмотреть файл

@ -6,16 +6,17 @@ import shlex
from pkg_resources import safe_name
import pip
from pip.req.req_file import parse_requirements, build_parser, break_args_options
from pip.req.req_file import (parse_requirements, build_parser,
break_args_options)
from hashin import run_single_package
def rdeps(pkg_name):
return sorted([safe_name(pkg.project_name)
for pkg in pip.get_installed_distributions()
if safe_name(pkg_name) in [
safe_name(requirement.project_name)
for requirement in pkg.requires()]])
for pkg in pip.get_installed_distributions()
if safe_name(pkg_name) in [
safe_name(requirement.project_name)
for requirement in pkg.requires()]])
def main(requirements_path):
@ -24,7 +25,7 @@ def main(requirements_path):
requirements_path, session=pip.download.PipSession())
requirements = [
req for req in parsed
# Skip packages from other requirements files
# Skip packages from other requirements files
if this_requirements_file in req.comes_from]
reverse_requirements = {}

Просмотреть файл

@ -116,7 +116,7 @@ INBOUND_EMAIL_VALIDATION_KEY = 'totally-unsecure-validation-string'
# If you have settings you want to overload, put them in a local_settings.py.
try:
from local_settings import * # noqa
except ImportError as exc:
except ImportError:
import warnings
import traceback