mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +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:
|
if target_media_player is UNDEFINED:
|
||||||
report(
|
report(
|
||||||
"calls media_source.async_resolve_media without passing an entity_id",
|
"calls media_source.async_resolve_media without passing an entity_id",
|
||||||
{DOMAIN},
|
exclude_integrations={DOMAIN},
|
||||||
)
|
)
|
||||||
target_media_player = None
|
target_media_player = None
|
||||||
|
|
||||||
|
@ -129,15 +129,19 @@ class MissingIntegrationFrame(HomeAssistantError):
|
|||||||
|
|
||||||
def report(
|
def report(
|
||||||
what: str,
|
what: str,
|
||||||
exclude_integrations: set | None = None,
|
*,
|
||||||
|
exclude_integrations: set[str] | None = None,
|
||||||
error_if_core: bool = True,
|
error_if_core: bool = True,
|
||||||
|
error_if_integration: bool = False,
|
||||||
level: int = logging.WARNING,
|
level: int = logging.WARNING,
|
||||||
log_custom_component_only: bool = False,
|
log_custom_component_only: bool = False,
|
||||||
error_if_integration: bool = False,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Report incorrect usage.
|
"""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:
|
try:
|
||||||
integration_frame = get_integration_frame(
|
integration_frame = get_integration_frame(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user