Update setup.cfg flake8 section

- Add the _n gettext prefix as a builtin, resolves "F821 undefined
  name"
- Include the main executable when running flake8 from the top directory
  without specifying files
- Ignore E402,F401 module import violations for specific files
This commit is contained in:
Chris Mayo 2020-05-25 19:37:27 +01:00
parent 50df8035d0
commit a8301f43ca

View file

@ -19,8 +19,26 @@ ignore-bad-ideas = *.mo
ignore = *.rej
[flake8]
builtins = _
filename =
*.py
./linkchecker
builtins =
_
_n
max-line-length = 80
per-file-ignores =
# In several files imports intentionally cause:
# E402: module level import not at top of file
# F401: module imported but unused
linkchecker: E402
setup.py: E402
linkcheck/__init__.py: E402,F401
linkcheck/bookmarks/chrome.py: E402
linkcheck/checker/httpurl.py: E402
linkcheck/htmlutil/htmlsoup.py: E402
linkcheck/parser/__init__.py: E402
tests/__init__.py: F401
extend-ignore =
# https://pep8.readthedocs.org/en/latest/intro.html#error-codes
# these are ignored by default: