Adjust pylint plugin to enforce diagnostics type hints (#64976)
* Adjust pylint plugin to enforce diagnostics type hints * Adjust return_type * Set return_type to UNDEFINED * Use Any for the expected data Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
b97cd3ce93
commit
cc7680b0c3
2 changed files with 30 additions and 7 deletions
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||
from http import HTTPStatus
|
||||
import json
|
||||
import logging
|
||||
from typing import Protocol
|
||||
from typing import Any, Protocol
|
||||
|
||||
from aiohttp import web
|
||||
import voluptuous as vol
|
||||
|
@ -51,12 +51,12 @@ class DiagnosticsProtocol(Protocol):
|
|||
|
||||
async def async_get_config_entry_diagnostics(
|
||||
self, hass: HomeAssistant, config_entry: ConfigEntry
|
||||
) -> dict:
|
||||
) -> Any:
|
||||
"""Return diagnostics for a config entry."""
|
||||
|
||||
async def async_get_device_diagnostics(
|
||||
self, hass: HomeAssistant, config_entry: ConfigEntry, device: DeviceEntry
|
||||
) -> dict:
|
||||
) -> Any:
|
||||
"""Return diagnostics for a device."""
|
||||
|
||||
|
||||
|
@ -125,7 +125,7 @@ def handle_get(
|
|||
|
||||
async def _async_get_json_file_response(
|
||||
hass: HomeAssistant,
|
||||
data: dict | list,
|
||||
data: Any,
|
||||
filename: str,
|
||||
domain: str,
|
||||
d_type: DiagnosticsType,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue