From f0e1fc1a49befb1fce1f1651515048cbcb5d9570 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sat, 3 Nov 2018 20:07:23 -0400 Subject: [PATCH] more pylint and mypy fixes --- .travis.yml | 2 +- torba/testing/testcase.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3169a13fc..105b20b43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ jobs: install: - pip install git+https://github.com/PyCQA/pylint.git - pip install mypy - - pip install -e . + - pip install -e .[test,server] script: - pylint --rcfile=setup.cfg torba - mypy --ignore-missing-imports torba diff --git a/torba/testing/testcase.py b/torba/testing/testcase.py index 8f2772c49..277cdf47a 100644 --- a/torba/testing/testcase.py +++ b/torba/testing/testcase.py @@ -1,4 +1,3 @@ -import asyncio import logging import unittest from unittest.case import _Outcome @@ -6,8 +5,11 @@ from .node import Conductor try: - from asyncio.runners import _cancel_all_tasks # pylint: disable=C0412 + import asyncio + from asyncio.runners import _cancel_all_tasks # type: ignore except ImportError: + import asyncio + # this is only available in py3.7 def _cancel_all_tasks(loop): pass