From 27514df2bdcb029619168f2eec4fd9167c698fe9 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Tue, 11 Sep 2018 17:25:25 +0200 Subject: [PATCH] Fix annotation of boto Key.set_contents_from_string (#2445) Closes #1552 --- third_party/2and3/boto/s3/key.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/2and3/boto/s3/key.pyi b/third_party/2and3/boto/s3/key.pyi index f7c1ca0ef..4200e7abd 100644 --- a/third_party/2and3/boto/s3/key.pyi +++ b/third_party/2and3/boto/s3/key.pyi @@ -1,4 +1,4 @@ -from typing import Any, Callable, Dict, Optional, Text, overload +from typing import Any, Callable, Dict, Optional, Text, Union, overload class Key: DefaultContentType: str @@ -156,7 +156,7 @@ class Key: ): ... def set_contents_from_string( self, - string_data: Text, + string_data: Union[Text, bytes], headers: Optional[Dict[Text, Text]] = ..., replace: bool = ..., cb: Optional[Callable[[int, int], Any]] = ...,