Skip to content

Commit

Permalink
Merge pull request #5530 from pradyunsg/misc/simplify-linter-use
Browse files Browse the repository at this point in the history
Simplify linter use and make configuration consistent
  • Loading branch information
pradyunsg authored Jul 4, 2018
2 parents fb9eb18 + c2b1ce9 commit 4ba6769
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
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

0 comments on commit 4ba6769

Please sign in to comment.