Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting for aiohttp post #299

Merged

Conversation

functionpointer
Copy link
Contributor

Modify the formatting so that mypy is happy.

@functionpointer
Copy link
Contributor Author

functionpointer commented Aug 20, 2024

The ASYNC109 looks like a false positive to me, as the timeout parameter is consumed by aiohttp.
So i added a noqa.
More info: astral-sh/ruff#12353

I also may have spotted a bug, where the timeout parameter is never actually used.
Instead, self.timeout is used directly. This is relevant in home.py:535, where historic data is fetched with a hard-coded timeout of 30s (in contrast to default 10s).
Given the longer timeout was never actually used, it may also be reasonable to remove the timeout parameter entirely.

@Danielhiversen
Copy link
Owner

Thanks

@Danielhiversen Danielhiversen merged commit 465a70d into Danielhiversen:master Aug 20, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants