Update mypy-dev to 1.12.0a3 (#124939)

* Update mypy-dev to 1.12.0a3

* Fix
This commit is contained in:
Marc Mueller 2024-08-31 19:34:41 +02:00 committed by GitHub
parent 994c2ebca1
commit 5cd8e4ab7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View file

@ -175,7 +175,7 @@ def _enable_posix_spawn() -> None:
# less efficient. This is a workaround to force posix_spawn()
# when using musl since cpython is not aware its supported.
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:

View file

@ -8,7 +8,10 @@ from __future__ import annotations
import dataclasses
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]]:
@ -111,6 +114,8 @@ class FrozenOrThawed(type):
"""
cls, *_args = args
if dataclasses.is_dataclass(cls):
if TYPE_CHECKING:
cls = cast(type[DataclassInstance], cls)
return object.__new__(cls)
return cls._dataclass(*_args, **kwargs)

View file

@ -11,7 +11,7 @@ astroid==3.2.4
coverage==7.6.0
freezegun==1.5.1
mock-open==1.4.0
mypy-dev==1.12.0a2
mypy-dev==1.12.0a3
pre-commit==3.7.1
pydantic==1.10.17
pylint==3.2.6