Put typing import into try block

This commit is contained in:
Martin Gaňo
2021-04-25 21:07:49 +02:00
parent 3f7b637a15
commit 74448df9f1
3 changed files with 15 additions and 3 deletions

View File

@@ -13,7 +13,11 @@
# limitations under the License.
import threading
from typing import Optional
try:
from typing import Optional
except ImportError:
pass
class StoppableThread(object):