mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Update pylint to 2.13.7 (#70381)
* Update pylint to 2.13.7 * Spelling * Remove old pylint config value * Code updates
This commit is contained in:
parent
020f94fa56
commit
90dab235f7
@ -1,6 +1,8 @@
|
|||||||
"""Diagnostics support for Xiaomi Miio."""
|
"""Diagnostics support for Xiaomi Miio."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
from homeassistant.components.diagnostics import async_redact_data
|
from homeassistant.components.diagnostics import async_redact_data
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_MAC, CONF_TOKEN, CONF_UNIQUE_ID
|
from homeassistant.const import CONF_MAC, CONF_TOKEN, CONF_UNIQUE_ID
|
||||||
@ -19,9 +21,9 @@ TO_REDACT = {
|
|||||||
|
|
||||||
async def async_get_config_entry_diagnostics(
|
async def async_get_config_entry_diagnostics(
|
||||||
hass: HomeAssistant, config_entry: ConfigEntry
|
hass: HomeAssistant, config_entry: ConfigEntry
|
||||||
) -> dict:
|
) -> dict[str, Any]:
|
||||||
"""Return diagnostics for a config entry."""
|
"""Return diagnostics for a config entry."""
|
||||||
diagnostics_data = {
|
diagnostics_data: dict[str, Any] = {
|
||||||
"config_entry": async_redact_data(config_entry.as_dict(), TO_REDACT)
|
"config_entry": async_redact_data(config_entry.as_dict(), TO_REDACT)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,6 +32,6 @@ async def async_get_config_entry_diagnostics(
|
|||||||
if isinstance(coordinator.data, dict):
|
if isinstance(coordinator.data, dict):
|
||||||
diagnostics_data["coordinator_data"] = coordinator.data
|
diagnostics_data["coordinator_data"] = coordinator.data
|
||||||
else:
|
else:
|
||||||
diagnostics_data["coordinator_data"] = coordinator.data.__repr__()
|
diagnostics_data["coordinator_data"] = repr(coordinator.data)
|
||||||
|
|
||||||
return diagnostics_data
|
return diagnostics_data
|
||||||
|
@ -70,7 +70,7 @@ async def async_process_integration_platform_for_component(
|
|||||||
are created.
|
are created.
|
||||||
"""
|
"""
|
||||||
if DATA_INTEGRATION_PLATFORMS not in hass.data:
|
if DATA_INTEGRATION_PLATFORMS not in hass.data:
|
||||||
# There are no integraton platforms loaded yet
|
# There are no integration platforms loaded yet
|
||||||
return
|
return
|
||||||
integration_platforms: list[IntegrationPlatform] = hass.data[
|
integration_platforms: list[IntegrationPlatform] = hass.data[
|
||||||
DATA_INTEGRATION_PLATFORMS
|
DATA_INTEGRATION_PLATFORMS
|
||||||
|
@ -828,7 +828,6 @@ class TemplateState(TemplateStateBase):
|
|||||||
__slots__ = ("_state",)
|
__slots__ = ("_state",)
|
||||||
|
|
||||||
# Inheritance is done so functions that check against State keep working
|
# Inheritance is done so functions that check against State keep working
|
||||||
# pylint: disable=super-init-not-called
|
|
||||||
def __init__(self, hass: HomeAssistant, state: State, collect: bool = True) -> None:
|
def __init__(self, hass: HomeAssistant, state: State, collect: bool = True) -> None:
|
||||||
"""Initialize template state."""
|
"""Initialize template state."""
|
||||||
super().__init__(hass, collect, state.entity_id)
|
super().__init__(hass, collect, state.entity_id)
|
||||||
|
@ -91,7 +91,6 @@ good-names = [
|
|||||||
# consider-using-assignment-expr (Pylint CodeStyle extension)
|
# consider-using-assignment-expr (Pylint CodeStyle extension)
|
||||||
disable = [
|
disable = [
|
||||||
"format",
|
"format",
|
||||||
"abstract-class-little-used",
|
|
||||||
"abstract-method",
|
"abstract-method",
|
||||||
"cyclic-import",
|
"cyclic-import",
|
||||||
"duplicate-code",
|
"duplicate-code",
|
||||||
|
@ -13,7 +13,7 @@ freezegun==1.2.1
|
|||||||
mock-open==1.4.0
|
mock-open==1.4.0
|
||||||
mypy==0.942
|
mypy==0.942
|
||||||
pre-commit==2.17.0
|
pre-commit==2.17.0
|
||||||
pylint==2.13.5
|
pylint==2.13.7
|
||||||
pipdeptree==2.2.1
|
pipdeptree==2.2.1
|
||||||
pylint-strict-informational==0.1
|
pylint-strict-informational==0.1
|
||||||
pytest-aiohttp==0.3.0
|
pytest-aiohttp==0.3.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user