mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Make optional arguments to frame.report kwarg only (#125062)
* Make optional arguments to frame.report kwarg only * Update homeassistant/helpers/frame.py Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> --------- Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
parent
5d072d1030
commit
8759a6a14d
@ -160,7 +160,7 @@ async def async_resolve_media(
|
||||
if target_media_player is UNDEFINED:
|
||||
report(
|
||||
"calls media_source.async_resolve_media without passing an entity_id",
|
||||
{DOMAIN},
|
||||
exclude_integrations={DOMAIN},
|
||||
)
|
||||
target_media_player = None
|
||||
|
||||
|
@ -129,15 +129,19 @@ class MissingIntegrationFrame(HomeAssistantError):
|
||||
|
||||
def report(
|
||||
what: str,
|
||||
exclude_integrations: set | None = None,
|
||||
*,
|
||||
exclude_integrations: set[str] | None = None,
|
||||
error_if_core: bool = True,
|
||||
error_if_integration: bool = False,
|
||||
level: int = logging.WARNING,
|
||||
log_custom_component_only: bool = False,
|
||||
error_if_integration: bool = False,
|
||||
) -> None:
|
||||
"""Report incorrect usage.
|
||||
|
||||
Async friendly.
|
||||
If error_if_core is True, raise instead of log if an integration is not found
|
||||
when unwinding the stack frame.
|
||||
If error_if_integration is True, raise instead of log if an integration is found
|
||||
when unwinding the stack frame.
|
||||
"""
|
||||
try:
|
||||
integration_frame = get_integration_frame(
|
||||
|
Loading…
x
Reference in New Issue
Block a user