Browse Source

add flake8 config

Nick Sweeting 6 years ago
parent
commit
1e45b02684
3 changed files with 5 additions and 4 deletions
  1. 4 0
      archivebox/.flake8
  2. 0 3
      archivebox/index.py
  3. 1 1
      archivebox/parse.py

+ 4 - 0
archivebox/.flake8

@@ -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

+ 0 - 3
archivebox/index.py

@@ -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,

+ 1 - 1
archivebox/parse.py

@@ -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: