add flake8 config

This commit is contained in:
Nick Sweeting 2019-03-30 15:41:26 -04:00
parent 03a388300f
commit 1e45b02684
3 changed files with 5 additions and 4 deletions

4
archivebox/.flake8 Normal file
View file

@ -0,0 +1,4 @@
[flake8]
ignore = D100,D101,D102,D103,D104,D105,D202,D203,D205,D400,E127,E131,E241,E252,E266,E272,E701,E731,W293,W503
select = F,E9
exclude = migrations,util_scripts,node_modules,venv

View file

@ -4,7 +4,6 @@ import json
from datetime import datetime from datetime import datetime
from string import Template from string import Template
from typing import List, Tuple, Iterator, Optional from typing import List, Tuple, Iterator, Optional
from dataclasses import fields
from .schema import Link, ArchiveResult from .schema import Link, ArchiveResult
from .config import ( from .config import (
@ -17,11 +16,9 @@ from .config import (
) )
from .util import ( from .util import (
merge_links, merge_links,
chmod_file,
urlencode, urlencode,
derived_link_info, derived_link_info,
wget_output_path, wget_output_path,
ExtendedEncoder,
enforce_types, enforce_types,
TimedProgress, TimedProgress,
copy_and_overwrite, copy_and_overwrite,

View file

@ -66,7 +66,7 @@ def parse_links(source_file: str) -> Tuple[List[Link], str]:
if links: if links:
timer.end() timer.end()
return links, parser_name return links, parser_name
except Exception as err: except Exception as err: # noqa
# Parsers are tried one by one down the list, and the first one # Parsers are tried one by one down the list, and the first one
# that succeeds is used. To see why a certain parser was not used # that succeeds is used. To see why a certain parser was not used
# due to error or format incompatibility, uncomment this line: # due to error or format incompatibility, uncomment this line: