Various type hint improvements (#37952)

This commit is contained in:
Ville Skyttä 2020-07-22 18:06:37 +03:00 committed by GitHub
parent 3e2555e2c1
commit aa1c5fc43d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 30 additions and 27 deletions

View file

@ -7,7 +7,7 @@ from homeassistant.util.async_ import protect_loop
def enable() -> None:
"""Enable the detection of I/O in the event loop."""
# Prevent urllib3 and requests doing I/O in event loop
HTTPConnection.putrequest = protect_loop(HTTPConnection.putrequest)
HTTPConnection.putrequest = protect_loop(HTTPConnection.putrequest) # type: ignore
# Currently disabled. pytz doing I/O when getting timezone.
# Prevent files being opened inside the event loop