Custom component -> Custom integration (#75404)

This commit is contained in:
Franck Nijhof 2022-07-18 22:10:22 +02:00 committed by GitHub
parent 3144d179e0
commit 7adb0f0ef5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 13 additions and 13 deletions

View file

@ -152,7 +152,7 @@ class NumberEntityDescription(EntityDescription):
else:
module = inspect.getmodule(self)
if module and module.__file__ and "custom_components" in module.__file__:
report_issue = "report it to the custom component author."
report_issue = "report it to the custom integration author."
else:
report_issue = (
"create a bug report at "
@ -222,7 +222,7 @@ class NumberEntity(Entity):
):
module = inspect.getmodule(cls)
if module and module.__file__ and "custom_components" in module.__file__:
report_issue = "report it to the custom component author."
report_issue = "report it to the custom integration author."
else:
report_issue = (
"create a bug report at "

View file

@ -275,7 +275,7 @@ def _suggest_report_issue(hass: HomeAssistant, entity_id: str) -> str:
custom_component = entity_sources(hass).get(entity_id, {}).get("custom_component")
report_issue = ""
if custom_component:
report_issue = "report it to the custom component author."
report_issue = "report it to the custom integration author."
else:
report_issue = (
"create a bug report at "

View file

@ -299,7 +299,7 @@ class WeatherEntity(Entity):
and module.__file__
and "custom_components" in module.__file__
):
report_issue = "report it to the custom component author."
report_issue = "report it to the custom integration author."
else:
report_issue = (
"create a bug report at "

View file

@ -936,7 +936,7 @@ class Entity(ABC):
"""Suggest to report an issue."""
report_issue = ""
if "custom_components" in type(self).__module__:
report_issue = "report it to the custom component author."
report_issue = "report it to the custom integration author."
else:
report_issue = (
"create a bug report at "

View file

@ -96,7 +96,7 @@ def report_integration(
index = found_frame.filename.index(path)
if path == "custom_components/":
extra = " to the custom component author"
extra = " to the custom integration author"
else:
extra = ""

View file

@ -150,7 +150,7 @@ def check_loop(
integration = found_frame.filename[start:end]
if path == "custom_components/":
extra = " to the custom component author"
extra = " to the custom integration author"
else:
extra = ""

View file

@ -107,7 +107,7 @@ async def test_deprecated_last_reset(
f"with state_class {state_class} has set last_reset. Setting last_reset for "
"entities with state_class other than 'total' is not supported. Please update "
"your configuration if state_class is manually configured, otherwise report it "
"to the custom component author."
"to the custom integration author."
) in caplog.text
state = hass.states.get("sensor.test")

View file

@ -775,7 +775,7 @@ def test_compile_hourly_sum_statistics_nan_inf_state(
(
"sensor.custom_sensor",
"from integration test ",
"report it to the custom component author",
"report it to the custom integration author",
),
],
)

View file

@ -183,7 +183,7 @@ async def test_warning_close_session_custom(hass, caplog):
await session.close()
assert (
"Detected integration that closes the Home Assistant aiohttp session. "
"Please report issue to the custom component author for hue using this method at "
"Please report issue to the custom integration author for hue using this method at "
"custom_components/hue/light.py, line 23: await session.close()" in caplog.text
)

View file

@ -715,7 +715,7 @@ async def test_warn_slow_write_state_custom_component(hass, caplog):
assert (
"Updating state for comp_test.test_entity "
"(<class 'custom_components.bla.sensor.test_warn_slow_write_state_custom_component.<locals>.CustomComponentEntity'>) "
"took 10.000 seconds. Please report it to the custom component author."
"took 10.000 seconds. Please report it to the custom integration author."
) in caplog.text

View file

@ -153,6 +153,6 @@ async def test_warning_close_session_custom(hass, caplog):
await httpx_session.aclose()
assert (
"Detected integration that closes the Home Assistant httpx client. "
"Please report issue to the custom component author for hue using this method at "
"Please report issue to the custom integration author for hue using this method at "
"custom_components/hue/light.py, line 23: await session.aclose()" in caplog.text
)

View file

@ -168,7 +168,7 @@ async def test_check_loop_async_custom(caplog):
hasync.check_loop(banned_function)
assert (
"Detected blocking call to banned_function inside the event loop. This is "
"causing stability issues. Please report issue to the custom component author "
"causing stability issues. Please report issue to the custom integration author "
"for hue doing blocking calls at custom_components/hue/light.py, line 23: "
"self.light.is_on" in caplog.text
)