Skip to content

Commit 8c6e42a

Browse files
committed
Switch to flake8 for linting
1 parent a927b57 commit 8c6e42a

File tree

5 files changed

+89
-11
lines changed

5 files changed

+89
-11
lines changed

.flake8

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[flake8]
2+
ignore =
3+
E122,
4+
E123,
5+
E221,
6+
E501,
7+
E731

cli_ui/__init__.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
from typing import IO, Any, Callable, Dict, List, Optional, Sequence, Tuple, Type, Union
2-
3-
Dict, Type
4-
51
import argparse
62
import datetime
73
import difflib
@@ -13,6 +9,7 @@
139
import sys
1410
import time
1511
import traceback
12+
from typing import IO, Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
1613

1714
import colorama
1815
import tabulate
@@ -40,6 +37,7 @@
4037
# and over again:
4138
_ENABLE_XTERM_TITLE = None
4239

40+
4341
colorama.init()
4442

4543

@@ -367,7 +365,7 @@ def debug(*tokens: Token, **kwargs: Any) -> None:
367365

368366
def indent_iterable(elems: Sequence[str], num: int = 2) -> List[str]:
369367
"""Indent an iterable."""
370-
return [" " * num + l for l in elems]
368+
return [" " * num + elem for elem in elems]
371369

372370

373371
def indent(text: str, num: int = 2) -> str:

lint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ set -e
44
poetry run black --check .
55
poetry run isort --check .
66
poetry run mypy cli_ui
7-
poetry run pyflakes cli_ui/__init__.py cli_ui/tests/test_cli_ui.py
7+
poetry run flake8 cli_ui/__init__.py cli_ui/tests/test_cli_ui.py
88
poetry run sphinx-build -W docs docs/_build/html

poetry.lock

+76-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ ghp-import = "^0.5.5"
2323
# linters
2424
black = "19.10b0"
2525
mypy = "^0.800"
26-
pyflakes = "2.1.1"
26+
flake8 = "^3.9.1"
27+
pep8-naming = "^0.11.1"
2728

2829
# tests
2930
attrs = "^19.3"

0 commit comments

Comments
 (0)