From a2f4f6e5ccf4f1a5bba0f9ee43c6a3237bec9612 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 21 Oct 2018 18:55:25 +0300 Subject: Add support for Python 3.7 --- .travis.yml | 6 ++++++ setup.py | 1 + tox.ini | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9132c4d..3e2fcf0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,12 @@ python: - 3.5 - 3.6 - pypy +# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs +matrix: + include: + - python: 3.7 + dist: xenial + sudo: true install: - pip install -q nose diff --git a/setup.py b/setup.py index 01488fc..6c827bc 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,7 @@ setup( 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries', diff --git a/tox.ini b/tox.ini index 558601e..30464f2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{27,34,35,36,py} +envlist = py{27,34,35,36,37,py} [testenv] commands = nosetests blessings -- cgit v1.2.1 From feb98cf9f9d48a29c0b9957561ef01179fcd44ef Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 21 Oct 2018 19:02:08 +0300 Subject: Upgrade Python syntax with pyupgrade https://github.com/asottile/pyupgrade --- blessings/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/blessings/__init__.py b/blessings/__init__.py index d9305e6..878720a 100644 --- a/blessings/__init__.py +++ b/blessings/__init__.py @@ -418,14 +418,14 @@ def derivative_colors(colors): [('on_bright_' + c) for c in colors]) -COLORS = set(['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', - 'white']) +COLORS = {'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', + 'white'} COLORS.update(derivative_colors(COLORS)) -SINGLES = set(['bold', 'reverse', 'blink', 'dim', 'flash']) -DUALS = set([ +SINGLES = {'bold', 'reverse', 'blink', 'dim', 'flash'} +DUALS = { 'underline', 'italic', 'shadow', 'standout', 'subscript', 'superscript' -]) -COMPOUNDABLES = (COLORS | SINGLES | DUALS | set(['no_' + c for c in DUALS])) +} +COMPOUNDABLES = (COLORS | SINGLES | DUALS | {'no_' + c for c in DUALS}) class ParametrizingString(text_type): -- cgit v1.2.1