mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Remove profiler from mypy ignore list (#74453)
This commit is contained in:
parent
8d6925b3ab
commit
ba18e11308
@ -7,7 +7,7 @@ import sys
|
||||
import threading
|
||||
import time
|
||||
import traceback
|
||||
from typing import Any
|
||||
from typing import Any, cast
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
@ -123,10 +123,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
for thread in threading.enumerate():
|
||||
if thread == main_thread:
|
||||
continue
|
||||
ident = cast(int, thread.ident)
|
||||
_LOGGER.critical(
|
||||
"Thread [%s]: %s",
|
||||
thread.name,
|
||||
"".join(traceback.format_stack(frames.get(thread.ident))).strip(),
|
||||
"".join(traceback.format_stack(frames.get(ident))).strip(),
|
||||
)
|
||||
|
||||
async def _async_dump_scheduled(call: ServiceCall) -> None:
|
||||
@ -136,13 +137,14 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
original_maxother = arepr.maxother
|
||||
arepr.maxstring = 300
|
||||
arepr.maxother = 300
|
||||
handle: asyncio.Handle
|
||||
try:
|
||||
for handle in hass.loop._scheduled: # pylint: disable=protected-access
|
||||
for handle in getattr(hass.loop, "_scheduled"):
|
||||
if not handle.cancelled():
|
||||
_LOGGER.critical("Scheduled: %s", handle)
|
||||
finally:
|
||||
arepr.max_string = original_maxstring
|
||||
arepr.max_other = original_maxother
|
||||
arepr.maxstring = original_maxstring
|
||||
arepr.maxother = original_maxother
|
||||
|
||||
async_register_admin_service(
|
||||
hass,
|
||||
|
3
mypy.ini
3
mypy.ini
@ -2719,9 +2719,6 @@ ignore_errors = true
|
||||
[mypy-homeassistant.components.plex.media_player]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.profiler]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.sonos]
|
||||
ignore_errors = true
|
||||
|
||||
|
@ -37,7 +37,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
||||
"homeassistant.components.onvif.device",
|
||||
"homeassistant.components.onvif.sensor",
|
||||
"homeassistant.components.plex.media_player",
|
||||
"homeassistant.components.profiler",
|
||||
"homeassistant.components.sonos",
|
||||
"homeassistant.components.sonos.alarms",
|
||||
"homeassistant.components.sonos.binary_sensor",
|
||||
|
Loading…
x
Reference in New Issue
Block a user