python < 3.10 need to use Union for multiple return types
This commit is contained in:
parent
0e05045817
commit
fc42f0c5c1
@ -1,6 +1,7 @@
|
||||
import boto3
|
||||
import io
|
||||
|
||||
from typing import Union
|
||||
from lib.application_configs import ApplicationConfigs
|
||||
|
||||
session = boto3.Session(
|
||||
@ -30,7 +31,7 @@ def get_object(key: str, bucket: str) -> bytes:
|
||||
Key=key,
|
||||
)['Body'].read()
|
||||
|
||||
def get_object_tag(key: str, bucket: str, tag_key: str) -> str | None:
|
||||
def get_object_tag(key: str, bucket: str, tag_key: str) -> Union[str, None]:
|
||||
tags = get_object_tags(key, bucket)
|
||||
tag_index = 0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user