Skip to content

Commit b99ed62

Browse files
author
peterstone2017
committed
address pr comments
1 parent e487530 commit b99ed62

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

azure/functions/_abc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import io
77
import typing
88

9+
from azure.functions._thirdparty.werkzeug.datastructures import Headers
910

1011
T = typing.TypeVar('T')
1112

@@ -193,7 +194,7 @@ def charset(self):
193194

194195
@property
195196
@abc.abstractmethod
196-
def headers(self):
197+
def headers(self) -> Headers:
197198
pass
198199

199200
@abc.abstractmethod

azure/functions/http.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33

44
import json
55
import typing
6+
from http.cookies import SimpleCookie
67

78
from azure.functions import _abc as azf_abc
89
from azure.functions import _http as azf_http
910
from . import meta
10-
11-
try:
12-
from http.cookies import SimpleCookie
13-
except ImportError:
14-
from Cookie import SimpleCookie # type: ignore
11+
from ._thirdparty.werkzeug.datastructures import Headers
1512

1613

1714
class HttpRequest(azf_http.HttpRequest):
@@ -83,7 +80,7 @@ def encode(cls, obj: typing.Any, *,
8380

8481
if isinstance(obj, azf_abc.HttpResponse):
8582
status = obj.status_code
86-
headers = obj.headers
83+
headers: Headers = obj.headers
8784

8885
if 'content-type' not in headers:
8986
if obj.mimetype.startswith('text/'):

0 commit comments

Comments
 (0)