Skip to content

Commit

Permalink
chore(cloud): mypy timeout typing (#268)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Improvements**
- Enhanced timeout management for API requests, allowing for more
flexible configurations and improved robustness.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
rokam authored Aug 9, 2024
1 parent 97defcd commit 3e61ded
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions midealocal/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from typing import Any, cast

import aiofiles
from aiohttp import ClientConnectionError, ClientSession
from aiohttp import ClientConnectionError, ClientSession, ClientTimeout
from commonregex import CommonRegex

from midealocal.exceptions import ElementMissing
Expand Down Expand Up @@ -205,7 +205,7 @@ async def _api_request(
url,
headers=header,
data=dump_data,
timeout=10,
timeout=ClientTimeout(10),
)
raw = await r.read()
_LOGGER.debug(
Expand Down Expand Up @@ -796,7 +796,7 @@ async def _api_request(
url,
headers=header,
data=data,
timeout=10,
timeout=ClientTimeout(10),
)
raw = await r.read()
_LOGGER.debug(
Expand Down

0 comments on commit 3e61ded

Please sign in to comment.