Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aioesphomeapi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from google.protobuf import message

from .api_pb2 import ( # type: ignore
from .api_pb2 import ( # type: ignore[attr-defined]
AlarmControlPanelCommandRequest,
BluetoothConnectionsFreeResponse,
BluetoothDeviceClearCacheResponse,
Expand Down
2 changes: 1 addition & 1 deletion aioesphomeapi/client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)
from ._frame_helper.noise import APINoiseFrameHelper # noqa: F401
from ._frame_helper.plain_text import APIPlaintextFrameHelper # noqa: F401
from .api_pb2 import ( # type: ignore
from .api_pb2 import ( # type: ignore[attr-defined]
BluetoothConnectionsFreeResponse,
BluetoothDeviceConnectionResponse,
BluetoothGATTErrorResponse,
Expand Down
2 changes: 1 addition & 1 deletion aioesphomeapi/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from ._frame_helper.base import MAX_NAME_LEN, safe_label_str
from ._frame_helper.noise import APINoiseFrameHelper
from ._frame_helper.plain_text import APIPlaintextFrameHelper
from .api_pb2 import ( # type: ignore # type: ignore
from .api_pb2 import ( # type: ignore[attr-defined]
DST_RULE_TYPE_DAY_OF_YEAR as DST_RULE_TYPE_DAY_OF_YEAR_PB,
DST_RULE_TYPE_JULIAN_NO_LEAP as DST_RULE_TYPE_JULIAN_NO_LEAP_PB,
DST_RULE_TYPE_MONTH_WEEK_DAY as DST_RULE_TYPE_MONTH_WEEK_DAY_PB,
Expand Down
2 changes: 1 addition & 1 deletion aioesphomeapi/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from aioesphomeapi.model import BluetoothGATTError

from .api_pb2 import ( # type: ignore
from .api_pb2 import ( # type: ignore[attr-defined]
AlarmControlPanelCommandRequest,
AlarmControlPanelStateResponse,
AuthenticationRequest,
Expand Down
2 changes: 1 addition & 1 deletion aioesphomeapi/log_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import logging
import sys

from .api_pb2 import SubscribeLogsResponse # type: ignore
from .api_pb2 import SubscribeLogsResponse # type: ignore[attr-defined]
from .client import APIClient
from .log_parser import parse_log_message
from .log_runner import async_run
Expand Down
2 changes: 1 addition & 1 deletion aioesphomeapi/log_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from zeroconf.asyncio import AsyncZeroconf

from .api_pb2 import SubscribeLogsResponse # type: ignore
from .api_pb2 import SubscribeLogsResponse # type: ignore[attr-defined]
from .client import APIClient
from .core import APIConnectionError
from .model import EntityInfo, EntityState, LogLevel
Expand Down
4 changes: 2 additions & 2 deletions aioesphomeapi/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


if TYPE_CHECKING:
from .api_pb2 import ( # type: ignore
from .api_pb2 import ( # type: ignore[attr-defined]
BluetoothLEAdvertisementResponse,
HomeassistantServiceMap,
)
Expand Down Expand Up @@ -1398,7 +1398,7 @@ def _convert_homeassistant_service_map(
if isinstance(value, dict):
# already a dict, don't convert
return value
return {v.key: v.value for v in value} # type: ignore
return {v.key: v.value for v in value} # type: ignore[union-attr]


@_frozen_dataclass_decorator
Expand Down
2 changes: 1 addition & 1 deletion aioesphomeapi/model_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import Any

from .api_pb2 import ( # type: ignore
from .api_pb2 import ( # type: ignore[attr-defined]
AlarmControlPanelStateResponse,
BinarySensorStateResponse,
ClimateStateResponse,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ select = [
"G", # flake8-logging-format
"I", # isort
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT006", # pytest-parametrize-names-wrong-type
Expand Down
2 changes: 1 addition & 1 deletion tests/test_log_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from aioesphomeapi.api_pb2 import (
DisconnectRequest,
DisconnectResponse,
SubscribeLogsResponse, # type: ignore
SubscribeLogsResponse, # type: ignore[attr-defined]
)
from aioesphomeapi.client import APIClient
from aioesphomeapi.connection import APIConnection
Expand Down
Loading