소스 검색

add flake8 config

Nick Sweeting 6 년 전
부모
커밋
1e45b02684
3개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  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 string import Template
 from typing import List, Tuple, Iterator, Optional
-from dataclasses import fields
 
 from .schema import Link, ArchiveResult
 from .config import (
@@ -17,11 +16,9 @@ from .config import (
 )
 from .util import (
     merge_links,
-    chmod_file,
     urlencode,
     derived_link_info,
     wget_output_path,
-    ExtendedEncoder,
     enforce_types,
     TimedProgress,
     copy_and_overwrite,

+ 1 - 1
archivebox/parse.py

@@ -66,7 +66,7 @@ def parse_links(source_file: str) -> Tuple[List[Link], str]:
                 if links:
                     timer.end()
                     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
                 # that succeeds is used. To see why a certain parser was not used
                 # due to error or format incompatibility, uncomment this line: