Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify linter use and make configuration consistent #5530

Merged
merged 2 commits into from
Jul 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
12 changes: 9 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[isort]
skip =
_vendor
__main__.py
.tox,
.scratch,
_vendor,
data
multi_line_output = 5
known_third_party =
pip._vendor
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re
import sys

from setuptools import setup, find_packages
from setuptools import find_packages, setup


here = os.path.abspath(os.path.dirname(__file__))
Expand Down
2 changes: 1 addition & 1 deletion src/pip/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
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())
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down