Moving from pep8 to pycodestyle

This commit is contained in:
Christiane Ruetten 2018-08-27 19:15:02 +02:00 коммит произвёл Christiane Ruetten
Родитель 998c0c1a41
Коммит 4e36f996be
2 изменённых файлов: 5 добавлений и 5 удалений

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

@ -29,7 +29,7 @@ def ignore_file(filename):
def main():
modified = re.compile('^[AM]+\s+(?P<name>.*\.py)', re.MULTILINE)
modified = re.compile('''^[AM]+\s+(?P<name>.*\.py)''', re.MULTILINE)
files = system('git', 'status', '--porcelain').decode("utf-8")
files = modified.findall(files)
@ -44,15 +44,15 @@ def main():
with open(filename, 'w') as f:
system('git', 'show', ':' + name, stdout=f)
try:
output = system('pep8', '--show-source', '--max-line-length=120', '.', cwd=tempdir)
output = system('pycodestyle', '--show-source', '--max-line-length=120', '.', cwd=tempdir).decode("utf-8")
except OSError:
print("The `pip8` checker is required for commits.")
print("The `pycodestyle` checker is required for commits.")
print("You probably haven't activated TLS Canary's Python dev environment.")
sys.exit(1)
shutil.rmtree(tempdir)
if output:
print(output, end=' ')
sys.stdout.write(output)
sys.exit(1)

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

@ -23,7 +23,7 @@ TESTS_REQUIRE = [
DEV_REQUIRES = [
'coverage',
'nose',
'pep8'
'pycodestyle'
]
setup(