Add Python 3.5 support and fix new flake8 errors

This commit is contained in:
Peter Schmidt 2016-01-20 12:39:02 +11:00
parent 273e41276a
commit 393dcf3aec
4 changed files with 9 additions and 3 deletions

View File

@ -20,6 +20,10 @@ before_install:
install:
- travis_retry python setup.py install
# See https://github.com/travis-ci/travis-ci/issues/4794
# and https://github.com/audreyr/cookiecutter/pull/540/files
python: 3.5
env:
- TOX_ENV=flake8
- TOX_ENV=py26
@ -27,6 +31,7 @@ env:
- TOX_ENV=py32
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=py35
- TOX_ENV=pypy
script:

View File

@ -25,6 +25,7 @@ makes sure premailer works in:
- Python 3.2
- Python 3.3
- Python 3.4
- Python 3.5
- PyPy
Turns CSS blocks into style attributes

View File

@ -27,7 +27,7 @@ else: # Python 2
StringIO = StringIO # shut up pyflakes
from urllib2 import urlopen
from urlparse import urljoin, urlparse
STR_TYPE = basestring
STR_TYPE = basestring # NOQA
import cssutils
from lxml import etree
@ -634,4 +634,4 @@ if __name__ == '__main__': # pragma: no cover
</body>
</html>"""
p = Premailer(html)
print (p.transform())
print(p.transform())

View File

@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
envlist = flake8, py26, py27, py32, py33, py34, pypy
envlist = flake8, py26, py27, py32, py33, py34, py35, pypy
[testenv]
passenv = *