From 060eca8157ab5a085932a389eec8d63f12243614 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 1 Nov 2018 13:05:04 +0100 Subject: [PATCH] Fix lint errors, add python 3.5 and 3.6 to tox --- rflink/parser.py | 2 +- tests/test_cli.py | 6 +++++- tox.ini | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rflink/parser.py b/rflink/parser.py index ffdad79..5ec416e 100644 --- a/rflink/parser.py +++ b/rflink/parser.py @@ -20,7 +20,7 @@ CONTROL_COMMAND = '[A-Z]+(=[A-Z0-9]+)?' DATA = '[a-zA-Z0-9;=_]+' RESPONSES = 'OK' -VERSION = '[0-9a-zA-Z\ \.-]+' +VERSION = r'[0-9a-zA-Z\ \.-]+' # 10;NewKaku;0cac142;3;ON; PACKET_COMMAND = DELIM.join(['10', PROTOCOL, ADDRESS, BUTTON, COMMAND]) diff --git a/tests/test_cli.py b/tests/test_cli.py index c4d52e8..31e9b3a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -16,7 +16,11 @@ def stop(): yield from asyncio.sleep(0.1) loop.stop() loop = asyncio.get_event_loop() - asyncio.async(stop(), loop=loop) + if hasattr(asyncio, 'ensure_future'): + ensure_future = asyncio.ensure_future + else: # Deprecated since Python 3.4.4 + ensure_future = getattr(asyncio, "async") + ensure_future(stop(), loop=loop) # use simulation interface args = ['--port', 'loop://', '-v'] diff --git a/tox.ini b/tox.ini index 661cdfd..3fdc902 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py34,py35,lint,typing +envlist = py34,py35,py36,py37,lint,typing skip_missing_interpreters = True [testenv]