Skip to content

Commit

Permalink
Fix typing in ClientSession ctor (aio-libs#3927)
Browse files Browse the repository at this point in the history
...by moving field type annotation to class definition
  • Loading branch information
AMDmi3 committed Aug 1, 2019
1 parent aa8c804 commit 4ec1a9a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ class ClientSession:
'_request_class', '_response_class',
'_ws_response_class', '_trace_configs')

_default_headers: CIMultiDict[str]

def __init__(self, *, connector: Optional[BaseConnector]=None,
cookies: Optional[LooseCookies]=None,
headers: Optional[LooseHeaders]=None,
Expand Down Expand Up @@ -239,10 +241,9 @@ def __init__(self, *, connector: Optional[BaseConnector]=None,

# Convert to list of tuples
if headers:
headers = CIMultiDict(headers)
self._default_headers = CIMultiDict(headers)
else:
headers = CIMultiDict()
self._default_headers = headers
self._default_headers = CIMultiDict()
if skip_auto_headers is not None:
self._skip_auto_headers = frozenset([istr(i)
for i in skip_auto_headers])
Expand Down

0 comments on commit 4ec1a9a

Please sign in to comment.