-
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Quentin Ferrand 2022-04-19 11:31:38 +02:00
parent 6bba5b962c
commit 93b7114ce2
2 changed files with 2 additions and 2 deletions

View file

@ -10,5 +10,5 @@ steps:
- pip install -q --upgrade pip black flake8 mypy pylint pytest
- flake8 --ignore=E501,W503,E265
- mypy --ignore-missing-imports ./tenkan/
- pylint --disable=E1101,E0401,C0301,W1514 --ignore=tenkan/__init__.py ./tenkan/
- pylint --disable=E1101,E0401,C0301,W1514,C0114 ./tenkan/
- pytest ./tests/

View file

@ -27,7 +27,7 @@ def write_files(path: str, data: dict, max_num_entries: int) -> None:
num_entries = 0
# count entries in index file
if pathlib.Path(f'{path}/index.gmi').is_file():
num_entries = sum(1 for line in open(f'{path}/index.gmi'))
num_entries = sum(1 for line in open(f'{path}/index.gmi')) # pylint: disable=consider-using-with
# if there is more articles than defined in max_num_entries, delete and rewrite
if num_entries > max_num_entries: