Skip to content

Commit 24edd0c

Browse files
committed
widgets/tests: Compatibility with Python 3.5.{0,1}
typing.Type was introduced in Python 3.5.2
1 parent e42c898 commit 24edd0c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Orange/widgets/tests/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
import unittest
55
from unittest.mock import Mock
66
# pylint: disable=unused-import
7-
from typing import List, Optional, Type, TypeVar
7+
from typing import List, Optional, TypeVar
8+
try:
9+
from typing import Type # typing.Type was added in 3.5.2
10+
except ImportError: # pragma: no cover
11+
pass
812

913
import numpy as np
1014
import sip

0 commit comments

Comments
 (0)