mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 14:47:38 +00:00
Update mypy-dev to 1.12.0a3 (#124939)
* Update mypy-dev to 1.12.0a3 * Fix
This commit is contained in:
parent
994c2ebca1
commit
5cd8e4ab7e
@ -175,7 +175,7 @@ def _enable_posix_spawn() -> None:
|
|||||||
# less efficient. This is a workaround to force posix_spawn()
|
# less efficient. This is a workaround to force posix_spawn()
|
||||||
# when using musl since cpython is not aware its supported.
|
# when using musl since cpython is not aware its supported.
|
||||||
tag = next(packaging.tags.sys_tags())
|
tag = next(packaging.tags.sys_tags())
|
||||||
subprocess._USE_POSIX_SPAWN = "musllinux" in tag.platform # noqa: SLF001
|
subprocess._USE_POSIX_SPAWN = "musllinux" in tag.platform # type: ignore[misc] # noqa: SLF001
|
||||||
|
|
||||||
|
|
||||||
def run(runtime_config: RuntimeConfig) -> int:
|
def run(runtime_config: RuntimeConfig) -> int:
|
||||||
|
@ -8,7 +8,10 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import sys
|
import sys
|
||||||
from typing import Any, dataclass_transform
|
from typing import TYPE_CHECKING, Any, cast, dataclass_transform
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from _typeshed import DataclassInstance
|
||||||
|
|
||||||
|
|
||||||
def _class_fields(cls: type, kw_only: bool) -> list[tuple[str, Any, Any]]:
|
def _class_fields(cls: type, kw_only: bool) -> list[tuple[str, Any, Any]]:
|
||||||
@ -111,6 +114,8 @@ class FrozenOrThawed(type):
|
|||||||
"""
|
"""
|
||||||
cls, *_args = args
|
cls, *_args = args
|
||||||
if dataclasses.is_dataclass(cls):
|
if dataclasses.is_dataclass(cls):
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
cls = cast(type[DataclassInstance], cls)
|
||||||
return object.__new__(cls)
|
return object.__new__(cls)
|
||||||
return cls._dataclass(*_args, **kwargs)
|
return cls._dataclass(*_args, **kwargs)
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ astroid==3.2.4
|
|||||||
coverage==7.6.0
|
coverage==7.6.0
|
||||||
freezegun==1.5.1
|
freezegun==1.5.1
|
||||||
mock-open==1.4.0
|
mock-open==1.4.0
|
||||||
mypy-dev==1.12.0a2
|
mypy-dev==1.12.0a3
|
||||||
pre-commit==3.7.1
|
pre-commit==3.7.1
|
||||||
pydantic==1.10.17
|
pydantic==1.10.17
|
||||||
pylint==3.2.6
|
pylint==3.2.6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user