diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d111d6d5..5b13e987 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,19 +3,29 @@ repos: rev: 18.9b0 hooks: - id: black - language_version: python3.6 + language_version: python3.7 # override until resolved: https://github.com/ambv/black/issues/402 files: \.pyi?$ types: [] - - repo: https://github.com/asottile/seed-isort-config - rev: v1.2.0 + rev: v1.5.0 hooks: - id: seed-isort-config - language_version: python3.6 - - repo: https://github.com/pre-commit/mirrors-isort rev: v4.3.4 hooks: - id: isort - language_version: python3.6 + - repo: https://github.com/pre-commit/mirrors-isort + rev: v4.3.4 + hooks: + - id: isort + language_version: python3.7 + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: debug-statements + - id: flake8 + language_version: python3.7 diff --git a/.travis.yml b/.travis.yml index c5020790..fa3e8629 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: trusty +dist: xenial group: travis_latest sudo: false cache: @@ -12,7 +12,18 @@ matrix: fast_finish: true include: + # lint + - python: "3.7" + stage: lint + env: TOXENV=lint + - python: "3.7" + env: TOXENV=manifest + - python: "3.7" + env: TOXENV=typing + + # test - python: "2.7" + stage: test env: TOXENV=py27 - python: "3.4" env: TOXENV=py34 @@ -22,31 +33,27 @@ matrix: env: TOXENV=py36 - python: "pypy" env: TOXENV=pypy + dist: trusty - python: "pypy3" env: TOXENV=pypy3 + dist: trusty - python: "3.7" env: TOXENV=py37 - dist: xenial - # Prevent breakage by a new releases + # Prevent breakage by new releases - python: "3.6-dev" env: TOXENV=py36 - python: "3.7-dev" env: TOXENV=py37 - # Meta - - python: "3.6" - env: TOXENV=lint - - python: "3.6" - env: TOXENV=manifest - - python: "3.6" + # Docs + - python: "3.7" + stage: docs env: TOXENV=docs - - python: "3.6" + - python: "3.7" env: TOXENV=readme - - python: "3.6" + - python: "3.7" env: TOXENV=changelog - - python: "3.6" - env: TOXENV=typing allow_failures: - python: "3.6-dev" diff --git a/docs/_static/attrs_logo.svg b/docs/_static/attrs_logo.svg index 1bb3e4b7..4326ae13 100644 --- a/docs/_static/attrs_logo.svg +++ b/docs/_static/attrs_logo.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/setup.cfg b/setup.cfg index 9f536bba..a856feaa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,4 +26,4 @@ multi_line_output=3 not_skip=__init__.py known_first_party=attr -known_third_party=UserDict,attr,hypothesis,pympler,pytest,setuptools,six,zope +known_third_party=hypothesis,pytest,setuptools,six,zope diff --git a/tox.ini b/tox.ini index 640490ad..3cc62e53 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pre-commit,typing,lint,py27,py34,py35,py36,py37,pypy,pypy3,manifest,docs,readme,changelog,coverage-report +envlist = typing,lint,py27,py34,py35,py36,py37,pypy,pypy3,manifest,docs,readme,changelog,coverage-report [testenv] @@ -27,37 +27,24 @@ commands = coverage run --parallel -m pytest {posargs} [testenv:coverage-report] -basepython = python3.6 -deps = coverage +basepython = python3.7 skip_install = true +deps = coverage commands = coverage combine coverage report [testenv:lint] +basepython = python3.7 skip_install = true -basepython = python3.6 -extras = tests -deps = - flake8 - flake8-isort - black -commands = - flake8 src tests setup.py conftest.py docs/conf.py - black --check setup.py conftest.py src tests docs/conf.py - - -[testenv:pre-commit] -skip_install = true -basepython = python3.6 deps = pre-commit passenv = HOMEPATH # needed on Windows commands = pre-commit run --all-files --verbose [testenv:docs] -basepython = python3.6 +basepython = python3.7 setenv = PYTHONHASHSEED = 0 extras = docs @@ -68,26 +55,26 @@ commands = [testenv:manifest] -basepython = python3.6 +basepython = python3.7 deps = check-manifest skip_install = true commands = check-manifest [testenv:readme] -basepython = python3.6 +basepython = python3.7 deps = readme_renderer skip_install = true commands = python setup.py check -r -s [testenv:changelog] -basepython = python3.6 +basepython = python3.7 deps = towncrier skip_install = true commands = towncrier --draft [testenv:typing] -basepython = python3.6 +basepython = python3.7 deps = mypy commands = mypy tests/typing_example.py