mirror of https://github.com/pypa/pip
Merge pull request #5530 from pradyunsg/misc/simplify-linter-use
Simplify linter use and make configuration consistent
This commit is contained in:
commit
4ba6769a68
|
@ -11,10 +11,10 @@
|
||||||
# All configuration values have a default; values that are commented out
|
# All configuration values have a default; values that are commented out
|
||||||
# serve to show the default.
|
# serve to show the default.
|
||||||
|
|
||||||
|
import glob
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import glob
|
|
||||||
|
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
|
|
||||||
|
|
12
setup.cfg
12
setup.cfg
|
@ -1,7 +1,9 @@
|
||||||
[isort]
|
[isort]
|
||||||
skip =
|
skip =
|
||||||
_vendor
|
.tox,
|
||||||
__main__.py
|
.scratch,
|
||||||
|
_vendor,
|
||||||
|
data
|
||||||
multi_line_output = 5
|
multi_line_output = 5
|
||||||
known_third_party =
|
known_third_party =
|
||||||
pip._vendor
|
pip._vendor
|
||||||
|
@ -12,7 +14,11 @@ default_section = THIRDPARTY
|
||||||
include_trailing_comma = true
|
include_trailing_comma = true
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
exclude = .tox,.idea,.scratch,*.egg,build,_vendor,data
|
exclude =
|
||||||
|
.tox,
|
||||||
|
.scratch,
|
||||||
|
_vendor,
|
||||||
|
data
|
||||||
select = E,W,F
|
select = E,W,F
|
||||||
|
|
||||||
[mypy]
|
[mypy]
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -3,7 +3,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
|
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
|
@ -13,7 +13,7 @@ if __package__ == '':
|
||||||
path = os.path.dirname(os.path.dirname(__file__))
|
path = os.path.dirname(os.path.dirname(__file__))
|
||||||
sys.path.insert(0, path)
|
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__':
|
if __name__ == '__main__':
|
||||||
sys.exit(_main())
|
sys.exit(_main())
|
||||||
|
|
4
tox.ini
4
tox.ini
|
@ -36,8 +36,8 @@ commands =
|
||||||
[lint]
|
[lint]
|
||||||
deps = -r{toxinidir}/tools/lint-requirements.txt
|
deps = -r{toxinidir}/tools/lint-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
flake8 .
|
flake8
|
||||||
isort --recursive --check-only --diff src/pip tests
|
isort --check-only --diff
|
||||||
|
|
||||||
[testenv:lint-py2]
|
[testenv:lint-py2]
|
||||||
basepython = python2
|
basepython = python2
|
||||||
|
|
Loading…
Reference in New Issue