mirror of
https://github.com/home-assistant/core.git
synced 2026-05-08 17:49:37 +01:00
Avoid expensive inspect calls in config validators (#112085)
* Avoid expensive inspect calls in config validators inspect has a performance problem https://github.com/python/cpython/issues/92041 We now avoid calling inspect unless we are going to log * remove unused * reduce * get_integration_logger
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
"""An integration which calls helpers.frame.get_integration_frame."""
|
||||
|
||||
import logging
|
||||
|
||||
from homeassistant.helpers import frame
|
||||
|
||||
|
||||
def call_get_integration_logger(fallback_name: str) -> logging.Logger:
|
||||
"""Call get_integration_logger."""
|
||||
return frame.get_integration_logger(fallback_name)
|
||||
|
||||
|
||||
def call_get_integration_frame() -> frame.IntegrationFrame:
|
||||
"""Call get_integration_frame."""
|
||||
return frame.get_integration_frame()
|
||||
|
||||
Reference in New Issue
Block a user