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:
Marc Mueller 2024-10-02 12:00:59 +02:00 committed by GitHub
parent 21266e1c68
commit 4cd6813d16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 12 deletions

View File

@ -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]):

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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",