Skip to content

Commit b427180

Browse files
author
Bret Ambrose
committed
Fix type annotation
1 parent 130e1a6 commit b427180

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

awsiot/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from concurrent.futures import Future
2020
from dataclasses import dataclass
2121
import json
22-
from typing import Any, Callable, Dict, Generic, Optional, Tuple, TypeVar
22+
from typing import Any, Callable, Dict, Generic, Optional, Tuple, TypeVar, Union
2323

2424
__version__ = '1.0.0-dev'
2525

@@ -37,7 +37,7 @@ class MqttServiceClient:
3737
mqtt_connection: MQTT connection to use
3838
"""
3939

40-
def __init__(self, mqtt_connection: mqtt.Connection or mqtt5.Client):
40+
def __init__(self, mqtt_connection: Union[mqtt.Connection, mqtt5.Client]):
4141
if isinstance(mqtt_connection, mqtt.Connection):
4242
self._mqtt_connection = mqtt_connection # type: mqtt.Connection
4343
elif isinstance(mqtt_connection, mqtt5.Client):

0 commit comments

Comments
 (0)