From 5dfc913d91fda85119ad2cd54861d2e1c3b5ca17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Tue, 24 Sep 2019 19:43:32 +0100 Subject: Remove try/except around typing imports. Since Python 3.4 is no longer supported, there's no reason for typing not to be there. --- glucometerutils/common.py | 6 +----- glucometerutils/support/freestyle.py | 6 +----- glucometerutils/support/hiddevice.py | 6 +----- glucometerutils/support/serial.py | 6 +----- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/glucometerutils/common.py b/glucometerutils/common.py index 8b41320..e7be7ec 100644 --- a/glucometerutils/common.py +++ b/glucometerutils/common.py @@ -6,11 +6,7 @@ import datetime import enum import textwrap - -try: - from typing import Optional, Sequence -except ImportError: - pass +from typing import Optional, Sequence import attr diff --git a/glucometerutils/support/freestyle.py b/glucometerutils/support/freestyle.py index c7dbdb9..d61842e 100644 --- a/glucometerutils/support/freestyle.py +++ b/glucometerutils/support/freestyle.py @@ -12,11 +12,7 @@ import csv import datetime import logging import re - -try: - from typing import AnyStr, Iterator, List, Optional, Text, Tuple -except ImportError: - pass +from typing import AnyStr, Iterator, List, Optional, Text, Tuple import construct diff --git a/glucometerutils/support/hiddevice.py b/glucometerutils/support/hiddevice.py index ecf989b..b44e5c7 100644 --- a/glucometerutils/support/hiddevice.py +++ b/glucometerutils/support/hiddevice.py @@ -6,11 +6,7 @@ import logging import os - -try: - from typing import BinaryIO, Optional, Text -except ImportError: - pass +from typing import BinaryIO, Optional, Text from glucometerutils import exceptions diff --git a/glucometerutils/support/serial.py b/glucometerutils/support/serial.py index 4566e54..6067cf7 100644 --- a/glucometerutils/support/serial.py +++ b/glucometerutils/support/serial.py @@ -5,11 +5,7 @@ """ import logging - -try: - from typing import Optional, Text -except ImportError: - pass +from typing import Optional, Text import serial -- cgit v1.2.3