Skip to content

Commit befbbc5

Browse files
committed
[Core] Update for next-mypy
This updates azure-core and corehttp to pass the next-mypy checks. Signed-off-by: Paul Van Eck <[email protected]>
1 parent a6eef48 commit befbbc5

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

sdk/core/azure-core/azure/core/pipeline/transport/_requests_asyncio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ async def send( # pylint:disable=invalid-overridden-method
155155
:keyword MutableMapping proxies: will define the proxy to use. Proxy is a dict (protocol, url)
156156
"""
157157
self.open()
158+
assert self.session is not None
158159
loop = kwargs.get("loop", _get_running_loop())
159160
response = None
160161
error: Optional[AzureErrorUnion] = None

sdk/core/azure-core/azure/core/pipeline/transport/_requests_trio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ async def send(
228228
:keyword MutableMapping proxies: will define the proxy to use. Proxy is a dict (protocol, url)
229229
"""
230230
self.open()
231+
assert self.session is not None
231232
trio_limiter = kwargs.get("trio_limiter", None)
232233
response = None
233234
error: Optional[AzureErrorUnion] = None

sdk/core/azure-core/azure/core/rest/_http_response_impl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,10 @@ def encoding(self) -> Optional[str]:
294294
return self._encoding
295295

296296
@encoding.setter
297-
def encoding(self, value: str) -> None:
297+
def encoding(self, value: Optional[str]) -> None:
298298
"""Sets the response encoding.
299299
300-
:param str value: Sets the response encoding.
300+
:param optional[str] value: Sets the response encoding.
301301
"""
302302
self._encoding = value
303303
self._text = None # clear text cache

sdk/core/corehttp/corehttp/rest/_http_response_impl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ def encoding(self) -> Optional[str]:
166166
return self._encoding
167167

168168
@encoding.setter
169-
def encoding(self, value: str) -> None:
169+
def encoding(self, value: Optional[str]) -> None:
170170
"""Sets the response encoding.
171171
172-
:param str value: Sets the response encoding.
172+
:param optional[str] value: Sets the response encoding.
173173
"""
174174
self._encoding = value
175175
self._text = None # clear text cache

0 commit comments

Comments
 (0)