Merge pull request #5530 from pradyunsg/misc/simplify-linter-use

Simplify linter use and make configuration consistent
This commit is contained in:
Pradyun Gedam 2018-07-04 14:27:33 +05:30 committed by GitHub
commit 4ba6769a68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 8 deletions

View File

@ -11,10 +11,10 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import glob
import os
import re
import sys
import glob
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

View File

@ -1,7 +1,9 @@
[isort]
skip =
_vendor
__main__.py
.tox,
.scratch,
_vendor,
data
multi_line_output = 5
known_third_party =
pip._vendor
@ -12,7 +14,11 @@ default_section = THIRDPARTY
include_trailing_comma = true
[flake8]
exclude = .tox,.idea,.scratch,*.egg,build,_vendor,data
exclude =
.tox,
.scratch,
_vendor,
data
select = E,W,F
[mypy]

View File

@ -3,7 +3,7 @@ import os
import re
import sys
from setuptools import setup, find_packages
from setuptools import find_packages, setup
here = os.path.abspath(os.path.dirname(__file__))

View File

@ -13,7 +13,7 @@ if __package__ == '':
path = os.path.dirname(os.path.dirname(__file__))
sys.path.insert(0, path)
from pip._internal import main as _main # noqa
from pip._internal import main as _main # isort:skip # noqa
if __name__ == '__main__':
sys.exit(_main())

View File

@ -36,8 +36,8 @@ commands =
[lint]
deps = -r{toxinidir}/tools/lint-requirements.txt
commands =
flake8 .
isort --recursive --check-only --diff src/pip tests
flake8
isort --check-only --diff
[testenv:lint-py2]
basepython = python2