mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 04:05:20 +01:00
Fix special case in pylint type hint plugin (#118454)
* Fix special case in pylint type hint plugin * Simplify * Simplify * Simplify * Apply Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> --------- Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
This commit is contained in:
@@ -54,6 +54,7 @@ def test_regex_get_module_platform(
|
||||
("list[dict[str, str]]", 1, ("list", "dict[str, str]")),
|
||||
("list[dict[str, Any]]", 1, ("list", "dict[str, Any]")),
|
||||
("tuple[bytes | None, str | None]", 2, ("tuple", "bytes | None", "str | None")),
|
||||
("Callable[[], TestServer]", 2, ("Callable", "[]", "TestServer")),
|
||||
],
|
||||
)
|
||||
def test_regex_x_of_y_i(
|
||||
@@ -1130,12 +1131,14 @@ def test_notify_get_service(
|
||||
def test_pytest_function(
|
||||
linter: UnittestLinter, type_hint_checker: BaseChecker
|
||||
) -> None:
|
||||
"""Ensure valid hints are accepted for async_get_service."""
|
||||
"""Ensure valid hints are accepted for a test function."""
|
||||
func_node = astroid.extract_node(
|
||||
"""
|
||||
async def test_sample( #@
|
||||
hass: HomeAssistant,
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
aiohttp_server: Callable[[], TestServer],
|
||||
unused_tcp_port_factory: Callable[[], int],
|
||||
) -> None:
|
||||
pass
|
||||
""",
|
||||
|
||||
Reference in New Issue
Block a user