Skip to content

Commit

Permalink
Merge 49e8590 into 072118e
Browse files Browse the repository at this point in the history
  • Loading branch information
mkouhei committed Mar 18, 2019
2 parents 072118e + 49e8590 commit ad22694
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .pylintrc
@@ -1,5 +1,5 @@
[MASTER]
ignore=setup.py,docs/source/conf.py
ignore=setup.py,conf.py

[MESSAGES CONTROL]
disable=
Expand Down
11 changes: 5 additions & 6 deletions .travis.yml
@@ -1,3 +1,4 @@
dist: xenial
language: python
sudo: false

Expand All @@ -11,16 +12,14 @@ after_success:

matrix:
include:
- python: 3.7
env: TOX_ENV=py37
allow_failures:
- python: 2.7
env: TOX_ENV=py27
- python: 3.5
env: TOX_ENV=py35
- python: 3.6
env: TOX_ENV=py36
- python: pypy
env: TOX_ENV=pypy
allow_failures:
- python: pypy3
- python: pypy3.5
env: TOX_ENV=pypy3
- python: 3.7
env: TOX_ENV=py37
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -20,7 +20,7 @@ Status
Requirements
============

* Python 2.7 or Python 3.5 over or PyPy 2.4.0 over
* Python 2.7 or Python 3.6 over or PyPy 2.4.0 over

Features
========
Expand Down
6 changes: 3 additions & 3 deletions pguard.py
Expand Up @@ -96,9 +96,9 @@ def guard(*guard_clauses):
... g(fibo(n - 1) + fibo(n - 2))
... )
>>> [f(i) for i in range(-1, 10)]
[Exception('out of range',), 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
>>> # Python3.7
>>> # [Exception('out of range'), 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
[Exception('out of range'), 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
>>> # Python3.6, PyPy7.0
>>> # [Exception('out of range',), 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
>>> b = lambda w, h: guard(
... g('Very severely underweight', w / h ** 2 < 15.0),
Expand Down
3 changes: 0 additions & 3 deletions setup.py
Expand Up @@ -41,10 +41,7 @@ def read_content(filepath):
"License :: OSI Approved :: "
"GNU Lesser General Public License v3 or later (LGPLv3+)",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
Expand Down
34 changes: 3 additions & 31 deletions tox.ini
@@ -1,8 +1,6 @@
[tox]
envlist =
py27,
py36,
pypy,
py37,
pycodestyle,
pydocstyle,
docs
Expand All @@ -24,26 +22,6 @@ show-source = True
statistics = True
exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,docs

[testenv:py27]
deps=
{[py]deps}
basepython = python2.7

[testenv:py33]
deps=
{[py]deps}
basepython = python3.3

[testenv:py34]
deps=
{[py]deps}
basepython = python3.4

[testenv:py35]
deps=
{[py]deps}
basepython = python3.5

[testenv:py36]
deps=
{[py]deps}
Expand All @@ -68,23 +46,17 @@ basepython = pypy3
deps=
{[py]deps}
pycodestyle
basepython = python3.6
basepython = python3.7
commands = pycodestyle --first

[testenv:pydocstyle]
deps=
pydocstyle
commands = pydocstyle pguard.py
basepython = python3.6
basepython = python3.7

[testenv:docs]
deps=
Sphinx
sphinx_rtd_theme
commands = python setup.py build_sphinx

[testenv:pychecker]
deps=
http://sourceforge.net/projects/pychecker/files/latest/download#egg=PyChecker
basepython = python2.7
commands = pychecker -F pguard.py

0 comments on commit ad22694

Please sign in to comment.