Skip to content

Commit

Permalink
Rename tox lint-py3 to tox lint
Browse files Browse the repository at this point in the history
Merge pull request #6934 from pradyunsg/lint-python3-default
  • Loading branch information
pradyunsg authored Aug 27, 2019
2 parents 3c9770d + 7d84255 commit 3b2d138
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
# Basic Checks
- stage: primary
env: TOXENV=docs
- env: TOXENV=lint
- env: TOXENV=lint-py2
python: 2.7
- env: TOXENV=lint-py3
- env: TOXENV=mypy
- env: TOXENV=packaging
# Latest CPython
Expand Down
4 changes: 2 additions & 2 deletions docs/html/development/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ To use linters locally, run:

.. code-block:: console
$ tox -e lint

This comment has been minimized.

Copy link
@webknjaz

webknjaz Aug 31, 2019

Member

@pradyunsg you know you can also do

    $ tox -e lint,lint-py2

This comment has been minimized.

Copy link
@pradyunsg

pradyunsg Aug 31, 2019

Author Member

Yep yep.

I'd prefer to not introduce tox concepts in a getting started document though.

$ tox -e lint-py2
$ tox -e lint-py3
The above commands run the linters on Python 2 followed by Python 3.
The above commands run the linters on Python 3 followed by Python 2.

.. note::

Expand Down
4 changes: 2 additions & 2 deletions tools/travis/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
set -e

# Short circuit tests and linting jobs if there are no code changes involved.
if [[ $TOXENV != docs ]] && [[ $TOXENV != lint-py2 ]] && [[ $TOXENV != lint-py3 ]]; then
# Keep lint-py2 & lint-py3 for docs/conf.py
if [[ $TOXENV != docs ]] && [[ $TOXENV != lint-py2 ]] && [[ $TOXENV != lint ]]; then
# Keep lint and lint-py2, for docs/conf.py
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]
then
echo "This is not a PR -- will do a complete build."
Expand Down
16 changes: 8 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
minversion = 3.4.0
envlist =
docs, packaging, lint-py2, lint-py3, mypy,
docs, packaging, mypy, lint, lint-py2,
py27, py35, py36, py37, py38, pypy, pypy3

[helpers]
Expand Down Expand Up @@ -53,23 +53,23 @@ commands =
[lint]
deps = -r{toxinidir}/tools/requirements/lint.txt

[testenv:lint-py2]
[testenv:lint]
skip_install = True
basepython = python2
basepython = python3
deps = {[lint]deps}
commands_pre =
# No need to flake8 docs, tools & tasks in py2
commands =
flake8 src tests
flake8
isort --check-only --diff

[testenv:lint-py3]
[testenv:lint-py2]
skip_install = True
basepython = python3
basepython = python2
deps = {[lint]deps}
commands_pre =
# No need to flake8 docs, tools & tasks in py2
commands =
flake8
flake8 src tests
isort --check-only --diff

[testenv:mypy]
Expand Down

0 comments on commit 3b2d138

Please sign in to comment.