Files
zulip/tools/linter_lib/pep8.py
Anders Kaseorg 8927d2f240 lint: Restore pycodestyle wrapper’s check for empty list of files.
Commit ab647abad3 (#15779) accidentally
removed this.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-14 13:54:58 -07:00

11 lines
262 B
Python

from typing import List
from zulint.linters import run_command
from zulint.printer import colors
def check_pep8(files: List[str]) -> bool:
if not files:
return False
return run_command("pep8", next(colors), ["pycodestyle", "--", *files]) != 0