mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Update mypy-dev to 1.12.0a5 (#127181)
* Update mypy-dev to 1.12.0a5 * Fix enable_incomplete_feature * Fix vlc_telnet * Fix deconz
This commit is contained in:
parent
21266e1c68
commit
4cd6813d16
@ -138,7 +138,7 @@ class DeconzDevice[_DeviceT: _DeviceType](DeconzBase[_DeviceT], Entity):
|
||||
"""Return True if device is available."""
|
||||
if isinstance(self._device, PydeconzScene):
|
||||
return self.hub.available
|
||||
return self.hub.available and self._device.reachable # type: ignore[union-attr]
|
||||
return self.hub.available and self._device.reachable
|
||||
|
||||
|
||||
class DeconzSceneMixin(DeconzDevice[PydeconzScene]):
|
||||
|
@ -175,13 +175,13 @@ class VlcDevice(MediaPlayerEntity):
|
||||
|
||||
# Fall back to filename.
|
||||
if data_info := data.get("data"):
|
||||
self._attr_media_title = _get_str(data_info, "filename")
|
||||
media_title = _get_str(data_info, "filename")
|
||||
|
||||
# Strip out auth signatures if streaming local media
|
||||
if (media_title := self.media_title) and (
|
||||
pos := media_title.find("?authSig=")
|
||||
) != -1:
|
||||
if media_title and (pos := media_title.find("?authSig=")) != -1:
|
||||
self._attr_media_title = media_title[:pos]
|
||||
else:
|
||||
self._attr_media_title = media_title
|
||||
|
||||
@catch_vlc_errors
|
||||
async def async_media_seek(self, position: float) -> None:
|
||||
|
1
mypy.ini
1
mypy.ini
@ -8,7 +8,6 @@ platform = linux
|
||||
plugins = pydantic.mypy
|
||||
show_error_codes = true
|
||||
follow_imports = normal
|
||||
enable_incomplete_feature = NewGenericSyntax
|
||||
local_partial_types = true
|
||||
strict_equality = true
|
||||
no_implicit_optional = true
|
||||
|
@ -11,7 +11,7 @@ astroid==3.3.4
|
||||
coverage==7.6.1
|
||||
freezegun==1.5.1
|
||||
mock-open==1.4.0
|
||||
mypy-dev==1.12.0a3
|
||||
mypy-dev==1.12.0a5
|
||||
pre-commit==3.8.0
|
||||
pydantic==1.10.18
|
||||
pylint==3.3.1
|
||||
|
@ -36,11 +36,9 @@ GENERAL_SETTINGS: Final[dict[str, str]] = {
|
||||
"plugins": "pydantic.mypy",
|
||||
"show_error_codes": "true",
|
||||
"follow_imports": "normal",
|
||||
"enable_incomplete_feature": ", ".join( # noqa: FLY002
|
||||
[
|
||||
"NewGenericSyntax",
|
||||
]
|
||||
),
|
||||
# "enable_incomplete_feature": ", ".join( # noqa: FLY002
|
||||
# []
|
||||
# ),
|
||||
# Enable some checks globally.
|
||||
"local_partial_types": "true",
|
||||
"strict_equality": "true",
|
||||
|
Loading…
x
Reference in New Issue
Block a user