Backtestspydanticrun-20261009-110034#13207
Cannot use None as type argument
Our patch was judged better than the merged fix.
In this judgment, Patch B = our agent, Patch A = the merged fix.
Both patches widen the `__class_getitem__` annotation so `Box[None]` type-checks. Patch B changes the parameter to `Any` in `pydantic/main.py` and in the v1 `GenericModel`. This fixes the reported problem for every type checker, including PyCharm, which raised the original complaint. It adds runtime tests and new lines in `tests/typechecking/base_model.py` that exercise `Box[None]`, `Box[Literal['a']]` and `Box[int | None]` with `assert_type`. Those checks would have failed under the old `type[Any]` annotation with strict checkers. The `get_type_hints(...) is Any` assertions are close to tautological, but the typechecking cases are meaningful. The diff is small and focused. Patch A uses PEP 747 `TypeForm`, which is more principled in theory. In practice it depends on each checker supporting `TypeForm`, so it is not shown to fix the PyCharm warning. It is also a broad redesign with significant risk: - It removes the `TypeAdapter.__init__` overloads, including the `Any` fallback, so checkers without `TypeForm` support may now reject special forms. - It drops `| None` from `_FromFieldInfoInputs.annotation`. - It changes `FieldInfo` and serializer annotations, adding `pyright: ignore` comments for `PydanticUndefined` defaults. - It pins a pyright version in CI and adds pyrefly configuration, with dozens of pyrefly ignore comments across test files. - It removes the `enableExperimentalFeatures` setting. Much of this is unrelated to the issue and obscures the actual fix. Patch A's test updates mostly cover `TypeAdapter`, `create_model` and `ValidateAs` rather than the `BaseModel[None]` scenario. On correctness for the reported scenario, test relevance and scope, Patch B is the safer and better fix.
The judge saw only the two patches, labelled A and B in random order, with issue links and version numbers removed. The reasoning above is shown verbatim.
Solve
6m 36s
Wall-clock time in the container
Full test suite
No new failures
12,617 passed · 509 skipped · 13,126 total
Contamination audit
Clean
No sign the agent saw the real fix
Patch size
61vs 273 merged
Changed lines, ours vs merged
The issue
View on GitHubInitial Checks
- I confirm that I'm using Pydantic V2
Description
Pydantic's BaseModel.class_getitem is annotated as typevar_values: type[Any] | tuple[type[Any], ...], which causes type checkers to reject None as a type argument even though None is a valid PEP 484 type
annotation meaning type(None) / NoneType.
Error in PyCharm: Expected type 'type | tuple[type, ...]', got 'type[None]'
Root cause: pydantic/main.py BaseModel.class_getitem signature should acceptNone (and other special forms) as valid type arguments, not just type[Any].
We could use NoneType to get rid of the problem, however, I suggest we update annotation on pydantic side.
Example Code
import pydantic as p
class Box[T](p.BaseModel):
pass
# Triggers the warning because Pydantic's __class_getitem__ is typed as
# typevar_values: type[Any] | tuple[type[Any], ...]
# and None is not type[Any]:
x = Box[None]()
Python, Pydantic & OS Version
pydantic version: 2.12.5
pydantic-core version: 2.41.5
pydantic-core build: profile=release pgo=false
python version: 3.12.1 (main, Jan 29 2024, 11:55:01) [Clang 15.0.0 (clang-1500.1.0.2.5)]
platform: macOS-26.4.1-arm64-arm-64bit
related packages: pydantic-settings-2.13.1 typing_extensions-4.15.0
commit: unknownThe two patches
pydantic/main.pyindex be444fa7..f5cd04af 100644@@ -968,9 +968,7 @@ class BaseModel(metaclass=_model_construction.ModelMetaclass): [`model_rebuild()`][pydantic.main.BaseModel.model_rebuild]. """ - def __class_getitem__(- cls, typevar_values: type[Any] | tuple[type[Any], ...]- ) -> type[BaseModel] | _forward_ref.PydanticRecursiveRef:+ def __class_getitem__(cls, typevar_values: Any) -> type[BaseModel] | _forward_ref.PydanticRecursiveRef: cached = _generics.get_cached_generic_type_early(cls, typevar_values) if cached is not None: return cachedpydantic/v1/generics.pyindex fa1dcec4..0a6a8c3d 100644@@ -72,7 +72,7 @@ class GenericModel(BaseModel): __parameters__: ClassVar[Tuple[TypeVarType, ...]] # Setting the return type as Type[Any] instead of Type[BaseModel] prevents PyCharm warnings- def __class_getitem__(cls: Type[GenericModelT], params: Union[Type[Any], Tuple[Type[Any], ...]]) -> Type[Any]:+ def __class_getitem__(cls: Type[GenericModelT], params: Any) -> Type[Any]: """Instantiates a new class from a generic class `cls` and type variables `params`. :param params: Tuple of types the class . Given a generic classtests/test_generics.pyindex f8c396cf..cba4f942 100644@@ -19,6 +19,7 @@ from typing import ( NamedTuple, Optional, TypeVar,+ get_type_hints, ) import pytest@@ -2776,6 +2777,22 @@ def test_generic_none(): assert Container[None](value=None).value is None +def test_class_getitem_accepts_any_type_form_annotation() -> None:+ """`None`, `Literal[...]`, unions etc. are valid type arguments, so static type checkers+ must not be told that only `type[Any]` instances are accepted."""+ hints = get_type_hints(BaseModel.__class_getitem__, globalns=vars(sys.modules['pydantic.main']))+ assert hints['typevar_values'] is Any++ T = TypeVar('T')++ class Box(BaseModel, Generic[T]):+ value: T++ assert Box[None](value=None).value is None+ assert Box[Literal['a']](value='a').value == 'a'+ assert Box[Optional[int]](value=None).value is None++ @pytest.mark.skipif(platform.python_implementation() == 'PyPy', reason='PyPy does not allow ParamSpec in generics') def test_paramspec_is_usable(): # This used to cause a recursion error due to `P in P is True`tests/test_v1.pyindex bca6d4b7..249b5ac8 100644@@ -48,3 +48,21 @@ def test_isinstance_does_not_raise_deprecation_warnings(): assert not isinstance(v1_obj, V2BaseModel) assert not isinstance(v2_obj, V1BaseModel) assert isinstance(v2_obj, V2BaseModel)+++@pytest.mark.skipif(sys.version_info >= (3, 14), reason='Python 3.14+ not supported')+def test_generic_model_class_getitem_accepts_none():+ from typing import Any, Generic, Optional, TypeVar, get_type_hints++ from pydantic.v1.generics import GenericModel++ hints = get_type_hints(GenericModel.__class_getitem__)+ assert hints['params'] is Any++ T = TypeVar('T')++ class Box(GenericModel, Generic[T]):+ value: T++ assert Box[None](value=None).value is None+ assert Box[Optional[int]](value=None).value is Nonetests/typechecking/base_model.pyindex dfea4699..b9f86660 100644@@ -2,6 +2,8 @@ This file is used to test pyright's ability to check Pydantic's `BaseModel` related code. """ +from typing import Generic, Literal, TypeVar+ from typing_extensions import assert_type from pydantic import BaseModel, Field@@ -36,3 +38,21 @@ assert_type(Knight.model_fields, dict[str, FieldInfo]) assert_type(Knight.model_computed_fields, dict[str, ComputedFieldInfo]) assert_type(k.model_fields, dict[str, FieldInfo]) # type: ignore[deprecated] # pyright: ignore[reportDeprecated] assert_type(k.model_computed_fields, dict[str, ComputedFieldInfo]) # type: ignore[deprecated] # pyright: ignore[reportDeprecated]+++T = TypeVar('T')+++class Box(BaseModel, Generic[T]):+ value: T+++# `None` and other special forms are valid type arguments:+box_none = Box[None](value=None)+assert_type(box_none.value, None)++box_literal = Box[Literal['a']](value='a')+assert_type(box_literal.value, Literal['a'])++box_union = Box[int | None](value=None)+assert_type(box_union.value, int | None)
.github/workflows/ci.ymlindex 2170a2eef..ce4bdd8ce 100644@@ -796,6 +796,9 @@ jobs: - name: Run typechecking integration tests (Pyright) run: make test-typechecking-pyright+ env:+ # Until we get https://github.com/RobertCraigie/pyright-python/pull/365:+ PYRIGHT_PYTHON_FORCE_VERSION: '1.1.413' - name: Run typechecking integration tests (Mypy) run: make test-typechecking-mypyMakefileindex 64707cdcd..c563a7620 100644@@ -68,7 +68,7 @@ test-typechecking-mypy: .uv .PHONY: test-typechecking-pyrefly ## Typechecking integration tests (Pyrefly). test-typechecking-pyrefly: .uv- uv run bash -c 'cd tests/typechecking && pyrefly --version && pyrefly check'+ uv run bash -c 'cd tests/typechecking && pyrefly --version && pyrefly check --config pyproject.toml' .PHONY: test ## Run all tests, skipping the type-checker integration tests test: .uvpydantic/_internal/_decorators.pyindex a7bc6dfa3..160a18c00 100644@@ -13,7 +13,7 @@ from itertools import islice from typing import TYPE_CHECKING, Any, ClassVar, Generic, Literal, TypeAlias, TypeVar from pydantic_core import PydanticUndefined, PydanticUndefinedType, core_schema-from typing_extensions import Self, is_typeddict+from typing_extensions import Self, TypeForm, is_typeddict from ..errors import PydanticUserError from . import _type_refs@@ -106,7 +106,7 @@ class FieldSerializerDecoratorInfo: decorator_repr: ClassVar[str] = '@field_serializer' fields: tuple[str, ...] mode: Literal['plain', 'wrap']- return_type: Any+ return_type: TypeForm[Any] when_used: core_schema.WhenUsed check_fields: bool | None @@ -126,7 +126,7 @@ class ModelSerializerDecoratorInfo: decorator_repr: ClassVar[str] = '@model_serializer' mode: Literal['plain', 'wrap']- return_type: Any+ return_type: TypeForm[Any] when_used: core_schema.WhenUsed pydantic/_internal/_fields.pyindex 94477dfa2..29cde2dff 100644@@ -11,7 +11,7 @@ from re import Pattern from typing import TYPE_CHECKING, Any, TypeVar, cast from pydantic_core import PydanticUndefined-from typing_extensions import TypeIs, get_args, get_origin # noqa: UP035 (for `get_args` and `get_origin`)+from typing_extensions import TypeForm, TypeIs, get_args, get_origin # noqa: UP035 (for `get_args` and `get_origin`) from typing_inspection import typing_objects from typing_inspection.introspection import AnnotationSource @@ -44,8 +44,7 @@ class PydanticMetadata(Representation): @dataclasses.dataclass(slots=True, kw_only=True) class PydanticExtraInfo:- # TODO: make use of PEP 747:- annotation: Any+ annotation: TypeForm[Any] complete: bool pydantic/experimental/pipeline.pyindex 0fe407334..2eb8b94b2 100644@@ -14,6 +14,7 @@ from types import EllipsisType from typing import TYPE_CHECKING, Annotated, Any, Generic, Protocol, TypeAlias, TypeVar, overload import annotated_types+from typing_extensions import TypeForm if TYPE_CHECKING: from pydantic import GetCoreSchemaHandler@@ -28,16 +29,16 @@ __all__ = ['validate_as', 'validate_as_deferred', 'transform'] @dataclass(frozen=True, slots=True) class _ValidateAs:- tp: type[Any]+ tp: TypeForm[Any] strict: bool = False @dataclass class _ValidateAsDefer:- func: Callable[[], type[Any]]+ func: Callable[[], TypeForm[Any]] @cached_property- def tp(self) -> type[Any]:+ def tp(self) -> TypeForm[Any]: return self.func() @@ -138,7 +139,7 @@ class _Pipeline(Generic[_InT, _OutT]): return _Pipeline[_InT, _NewOutT](self._steps + (_Transform(func),)) @overload- def validate_as(self, tp: type[_NewOutT], *, strict: bool = False) -> _Pipeline[_InT, _NewOutT]: ...+ def validate_as(self, tp: TypeForm[_NewOutT], *, strict: bool = False) -> _Pipeline[_InT, _NewOutT]: ... @overload def validate_as(@@ -148,12 +149,7 @@ class _Pipeline(Generic[_InT, _OutT]): strict: bool = False, ) -> _Pipeline[_InT, Any]: ... - # TODO PEP 747: use TypeForm to properly type Annotated aliases (e.g. NewPath, FilePath).- # This fallback accepts any type expression but loses generic type inference.- @overload- def validate_as(self, tp: Any, *, strict: bool = ...) -> _Pipeline[_InT, Any]: ...-- def validate_as(self, tp: type[_NewOutT] | EllipsisType | Any, *, strict: bool = False) -> _Pipeline[_InT, Any]: # type: ignore+ def validate_as(self, tp: TypeForm[_NewOutT] | EllipsisType, *, strict: bool = False) -> _Pipeline[_InT, Any]: # type: ignore """Validate / parse the input into a new type. If no type is provided, the type of the field is used.@@ -439,7 +435,7 @@ def _apply_step(step: _Step, s: cs.CoreSchema | None, handler: GetCoreSchemaHand def _apply_parse( s: cs.CoreSchema | None,- tp: type[Any],+ tp: TypeForm[Any], strict: bool, handler: GetCoreSchemaHandler, source_type: Any,pydantic/fields.pyindex 5149a1823..4d9d4dce9 100644@@ -17,7 +17,7 @@ from warnings import warn import annotated_types import typing_extensions from pydantic_core import MISSING, PydanticUndefined-from typing_extensions import Self, TypedDict, Unpack, deprecated+from typing_extensions import Self, TypedDict, TypeForm, Unpack, deprecated from typing_inspection import typing_objects from typing_inspection.introspection import UNKNOWN, AnnotationSource, ForbiddenQualifier, Qualifier, inspect_annotation @@ -51,8 +51,7 @@ else: class _FromFieldInfoInputs(TypedDict, total=False): """This class exists solely to add type checking for the `**kwargs` in `FieldInfo.from_field`.""" - # TODO PEP 747: use TypeForm:- annotation: type[Any] | None+ annotation: TypeForm[Any] default_factory: Callable[[], Any] | Callable[[dict[str, Any]], Any] | None alias: str | None alias_priority: int | None@@ -91,8 +90,7 @@ class _FromFieldInfoInputs(TypedDict, total=False): class _FieldInfoAsDict(TypedDict, closed=True):- # TODO PEP 747: use TypeForm:- annotation: Any+ annotation: TypeForm[Any] | None metadata: list[Any] attributes: dict[str, Any] @@ -143,8 +141,7 @@ class FieldInfo(_repr.Representation): (e.g. [custom types handlers](../concepts/types.md#as-an-annotation) or any object not recognized by Pydantic). """ - # TODO PEP 747: use TypeForm:- annotation: type[Any] | None+ annotation: TypeForm[Any] | None default: Any default_factory: Callable[[], Any] | Callable[[dict[str, Any]], Any] | None alias: str | None@@ -223,7 +220,7 @@ class FieldInfo(_repr.Representation): def __init__( self, *,- annotation: type[Any] | None = _Unset,+ annotation: TypeForm[Any] | None = _Unset, default: Any = _Unset, default_factory: Callable[[], Any] | Callable[[dict[str, Any]], Any] | None = _Unset, alias: str | None = _Unset,pydantic/functional_serializers.pyindex aad3a8b8d..f7ab51849 100644@@ -9,6 +9,7 @@ from typing import TYPE_CHECKING, Annotated, Any, Literal, TypeAlias, TypeVar, o from pydantic_core import PydanticUndefined, core_schema from pydantic_core.core_schema import SerializationInfo, SerializerFunctionWrapHandler, WhenUsed+from typing_extensions import TypeForm from . import PydanticUndefinedAnnotation from ._internal import _decorators@@ -48,7 +49,7 @@ class PlainSerializer: """ func: core_schema.SerializerFunction- return_type: Any = PydanticUndefined+ return_type: TypeForm[Any] = PydanticUndefined # pyright: ignore[reportAssignmentType] when_used: WhenUsed = 'always' def __get_pydantic_core_schema__(self, source_type: Any, handler: GetCoreSchemaHandler) -> core_schema.CoreSchema:@@ -142,7 +143,7 @@ class WrapSerializer: """ func: core_schema.WrapSerializerFunction- return_type: Any = PydanticUndefined+ return_type: TypeForm[Any] = PydanticUndefined # pyright: ignore[reportAssignmentType] when_used: WhenUsed = 'always' def __get_pydantic_core_schema__(self, source_type: Any, handler: GetCoreSchemaHandler) -> core_schema.CoreSchema:@@ -202,7 +203,7 @@ def field_serializer( /, *fields: str, mode: Literal['wrap'],- return_type: Any = ...,+ return_type: TypeForm[Any] = ..., when_used: WhenUsed = ..., check_fields: bool | None = ..., ) -> Callable[[_FieldWrapSerializerT], _FieldWrapSerializerT]: ...@@ -214,7 +215,7 @@ def field_serializer( /, *fields: str, mode: Literal['plain'] = ...,- return_type: Any = ...,+ return_type: TypeForm[Any] = ..., when_used: WhenUsed = ..., check_fields: bool | None = ..., ) -> Callable[[_FieldPlainSerializerT], _FieldPlainSerializerT]: ...@@ -225,8 +226,7 @@ def field_serializer( # noqa: D417 /, *fields: str, mode: Literal['plain', 'wrap'] = 'plain',- # TODO PEP 747 (grep for 'return_type' on the whole code base):- return_type: Any = PydanticUndefined,+ return_type: TypeForm[Any] = PydanticUndefined, # pyright: ignore[reportArgumentType] when_used: WhenUsed = 'always', check_fields: bool | None = None, ) -> (@@ -339,7 +339,7 @@ def model_serializer(f: _ModelPlainSerializerT, /) -> _ModelPlainSerializerT: .. @overload def model_serializer(- *, mode: Literal['wrap'], when_used: WhenUsed = 'always', return_type: Any = ...+ *, mode: Literal['wrap'], when_used: WhenUsed = 'always', return_type: TypeForm[Any] = ... ) -> Callable[[_ModelWrapSerializerT], _ModelWrapSerializerT]: ... @@ -348,17 +348,17 @@ def model_serializer( *, mode: Literal['plain'] = ..., when_used: WhenUsed = 'always',- return_type: Any = ...,+ return_type: TypeForm[Any] = ..., ) -> Callable[[_ModelPlainSerializerT], _ModelPlainSerializerT]: ... -def model_serializer(+def model_serializer( # pyright: ignore[reportInconsistentOverload] f: _ModelPlainSerializerT | _ModelWrapSerializerT | None = None, /, *, mode: Literal['plain', 'wrap'] = 'plain', when_used: WhenUsed = 'always',- return_type: Any = PydanticUndefined,+ return_type: TypeForm[Any] = PydanticUndefined, # pyright: ignore[reportArgumentType] ) -> ( _ModelPlainSerializerT | Callable[[_ModelWrapSerializerT], _ModelWrapSerializerT]pydantic/functional_validators.pyindex 339e89946..066c6e0aa 100644@@ -10,7 +10,7 @@ from functools import partialmethod from typing import TYPE_CHECKING, Annotated, Any, Literal, TypeAlias, TypeVar, cast, overload from pydantic_core import PydanticUndefined, core_schema-from typing_extensions import Self+from typing_extensions import Self, TypeForm from ._internal import _decorators, _generics from .annotated_handlers import GetCoreSchemaHandler@@ -892,8 +892,7 @@ class ValidateAs: ``` """ - # TODO: make use of PEP 747- def __init__(self, from_type: type[_FromTypeT], /, instantiation_hook: Callable[[_FromTypeT], Any]) -> None:+ def __init__(self, from_type: TypeForm[_FromTypeT], /, instantiation_hook: Callable[[_FromTypeT], Any]) -> None: self.from_type = from_type self.instantiation_hook = instantiation_hook pydantic/main.pyindex be444fa7b..1c0258c69 100644@@ -31,7 +31,7 @@ from typing import ( import pydantic_core import typing_extensions from pydantic_core import PydanticUndefined, ValidationError-from typing_extensions import Self, Sentinel, TypeAlias, Unpack+from typing_extensions import Self, Sentinel, TypeAlias, TypeForm, Unpack from . import PydanticDeprecatedSince20, PydanticDeprecatedSince211 from ._internal import (@@ -643,7 +643,7 @@ class BaseModel(metaclass=_model_construction.ModelMetaclass): ) @classmethod- def model_parametrized_name(cls, params: tuple[type[Any], ...]) -> str:+ def model_parametrized_name(cls, params: tuple[TypeForm[Any], ...]) -> str: """Compute the class name for parametrizations of generic classes. This method can be overridden to achieve a custom naming scheme for generic BaseModels.@@ -969,7 +969,7 @@ class BaseModel(metaclass=_model_construction.ModelMetaclass): """ def __class_getitem__(- cls, typevar_values: type[Any] | tuple[type[Any], ...]+ cls, typevar_values: TypeForm[Any] | tuple[TypeForm[Any], ...] ) -> type[BaseModel] | _forward_ref.PydanticRecursiveRef: cached = _generics.get_cached_generic_type_early(cls, typevar_values) if cached is not None:@@ -1779,7 +1779,7 @@ def create_model( __validators__: dict[str, Callable[..., Any]] | None = None, __cls_kwargs__: dict[str, Any] | None = None, __qualname__: str | None = None,- **field_definitions: Any | tuple[Any, Any],+ **field_definitions: TypeForm[Any] | tuple[TypeForm[Any], Any], ) -> type[BaseModel]: ... @@ -1795,7 +1795,7 @@ def create_model( __validators__: dict[str, Callable[..., Any]] | None = None, __cls_kwargs__: dict[str, Any] | None = None, __qualname__: str | None = None,- **field_definitions: Any | tuple[Any, Any],+ **field_definitions: TypeForm[Any] | tuple[TypeForm[Any], Any], ) -> type[ModelT]: ... @@ -1810,8 +1810,7 @@ def create_model( # noqa: C901 __validators__: dict[str, Callable[..., Any]] | None = None, __cls_kwargs__: dict[str, Any] | None = None, __qualname__: str | None = None,- # TODO PEP 747: replace `Any` by the TypeForm:- **field_definitions: Any | tuple[Any, Any],+ **field_definitions: TypeForm[Any] | tuple[TypeForm[Any], Any], ) -> type[ModelT]: """!!! abstract "Usage Documentation" [Dynamic Model Creation](../concepts/models.md#dynamic-model-creation)pydantic/type_adapter.pyindex 1c6824acb..2bce1b638 100644@@ -14,11 +14,10 @@ from typing import ( TypeVar, cast, final,- overload, ) from pydantic_core import CoreSchema, SchemaSerializer, SchemaValidator, Some-from typing_extensions import ParamSpec, is_typeddict+from typing_extensions import ParamSpec, TypeForm, is_typeddict from pydantic.errors import PydanticUserError from pydantic.main import BaseModel, IncEx@@ -105,16 +104,6 @@ class TypeAdapter(Generic[T]): serializer: The schema serializer for the type. pydantic_complete: Whether the core schema for the type is successfully built. - ??? tip "Compatibility with `mypy`"- Depending on the type used, `mypy` might raise an error when instantiating a `TypeAdapter`. As a workaround, you can explicitly- annotate your variable:-- ```py- from pydantic import TypeAdapter-- ta: TypeAdapter[str | int] = TypeAdapter(str | int) # type: ignore[arg-type]- ```- ??? info "Namespace management nuances and implementation details" Here, we collect some notes on namespace management, and subtle differences from `BaseModel`:@@ -168,32 +157,9 @@ class TypeAdapter(Generic[T]): serializer: SchemaSerializer pydantic_complete: bool - @overload- def __init__(- self,- type: type[T],- *,- config: ConfigDict | None = ...,- _parent_depth: int = ...,- module: str | None = ...,- ) -> None: ...-- # This second overload is for unsupported special forms (such as Annotated, Union, etc.)- # Currently there is no way to type this correctly- # See https://github.com/python/typing/pull/1618- @overload- def __init__(- self,- type: Any,- *,- config: ConfigDict | None = ...,- _parent_depth: int = ...,- module: str | None = ...,- ) -> None: ...- def __init__( self,- type: Any,+ type: TypeForm[T], *, config: ConfigDict | None = None, _parent_depth: int = 2,tests/test_missing_sentinel.pyindex 8c6b8ef3a..526122426 100644@@ -33,8 +33,7 @@ def test_missing_sentinel_model() -> None: def test_missing_sentinel_type_adapter() -> None: """Note that this usage isn't explicitly supported (and useless in practice).""" - # TODO Remove annotation with PEP 747:- ta: TypeAdapter[object] = TypeAdapter(MISSING)+ ta = TypeAdapter(MISSING) assert ta.validate_python(MISSING) is MISSING tests/typechecking/base_model.pyindex dfea46991..d71275455 100644@@ -16,13 +16,13 @@ class MyModel(BaseModel): m1 = MyModel(x='hello', y=[1, 2, 3]) -m2 = MyModel(x='hello') # type: ignore[call-arg] # pyright: ignore[reportCallIssue]+m2 = MyModel(x='hello') # type: ignore[call-arg] # pyright: ignore[reportCallIssue] # pyrefly: ignore[missing-argument] m3 = MyModel(x='hello', y=[1, '2', b'3']) # type: ignore[list-item] # pyright: ignore[reportArgumentType] -m1.z + 'not an int' # type: ignore[operator] # pyright: ignore[reportOperatorIssue]+m1.z + 'not an int' # type: ignore[operator] # pyright: ignore[reportOperatorIssue] # pyrefly: ignore[unsupported-operation] -m1.foobar # type: ignore[attr-defined] # pyright: ignore[reportAttributeAccessIssue]+m1.foobar # type: ignore[attr-defined] # pyright: ignore[reportAttributeAccessIssue] # pyrefly: ignore[missing-attribute] class Knight(BaseModel):@@ -34,5 +34,5 @@ k = Knight() # type: ignore[call-arg] # pyright: ignore[reportCallIssue] assert_type(Knight.model_fields, dict[str, FieldInfo]) assert_type(Knight.model_computed_fields, dict[str, ComputedFieldInfo])-assert_type(k.model_fields, dict[str, FieldInfo]) # type: ignore[deprecated] # pyright: ignore[reportDeprecated]-assert_type(k.model_computed_fields, dict[str, ComputedFieldInfo]) # type: ignore[deprecated] # pyright: ignore[reportDeprecated]+assert_type(k.model_fields, dict[str, FieldInfo]) # type: ignore[deprecated] # pyright: ignore[reportDeprecated] # pyrefly: ignore[deprecated]+assert_type(k.model_computed_fields, dict[str, ComputedFieldInfo]) # type: ignore[deprecated] # pyright: ignore[reportDeprecated] # pyrefly: ignore[deprecated]tests/typechecking/computed_field.pyindex c7e15f943..d188a210b 100644@@ -21,6 +21,6 @@ class Square(BaseModel): sq = Square(side=10) y = 12.4 + sq.area-z = 'x' + sq.area # type: ignore[operator] # pyright: ignore[reportOperatorIssue]+z = 'x' + sq.area # type: ignore[operator] # pyright: ignore[reportOperatorIssue] # pyrefly: ignore[unsupported-operation] y_cached = 12.4 + sq.area_cached-z_cached = 'x' + sq.area_cached # type: ignore[operator] # pyright: ignore[reportOperatorIssue]+z_cached = 'x' + sq.area_cached # type: ignore[operator] # pyright: ignore[reportOperatorIssue] # pyrefly: ignore[unsupported-operation]tests/typechecking/decorators.pyindex 95f4f9752..8dfaef054 100644@@ -57,10 +57,10 @@ class BeforeModelValidator(BaseModel): class WrapModelValidator(BaseModel):- @model_validator(mode='wrap') # type: ignore[arg-type] # pyright: ignore[reportArgumentType]+ @model_validator(mode='wrap') # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-argument-type] def no_classmethod(cls, value: Any, handler: ModelWrapValidatorHandler[Self]) -> Self: ... - @model_validator(mode='wrap') # type: ignore[arg-type] # pyright: ignore[reportArgumentType]+ @model_validator(mode='wrap') # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-argument-type] @classmethod def no_handler(cls, value: Any) -> Self: ... @@ -94,7 +94,7 @@ class WrapModelValidator(BaseModel): class AfterModelValidator(BaseModel): # Mypy somehow reports "Cannot infer function type argument" here:- @model_validator(mode='after') # type:ignore[misc] # pyright: ignore[reportArgumentType]+ @model_validator(mode='after') # type:ignore[misc] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-argument-type] def missing_return_value(self) -> None: ... @model_validator(mode='after')@@ -121,7 +121,7 @@ class BeforeFieldValidator(BaseModel): @classmethod def valid_classmethod(cls, value: Any) -> Any: ... - @field_validator('foo', mode='before') # type: ignore[type-var] # pyright: ignore[reportArgumentType]+ @field_validator('foo', mode='before') # type: ignore[type-var] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-specialization] @classmethod def invalid_with_info(cls, value: Any, info: int) -> Any: ... @@ -147,7 +147,7 @@ class AfterFieldValidator(BaseModel): @classmethod def valid_classmethod_info(cls, value: Any, info: ValidationInfo[int]) -> Any: ... - @field_validator('foo', mode='after', json_schema_input_type=int) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType]+ @field_validator('foo', mode='after', json_schema_input_type=int) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # pyrefly: ignore[no-matching-overload] @classmethod def invalid_input_type_not_allowed(cls, value: Any) -> Any: ... @@ -163,7 +163,7 @@ class WrapFieldValidator(BaseModel): `pydantic_core.core_schema.NoInfoWrapValidatorFunction`. """ - @field_validator('foo', mode='wrap') # type: ignore[type-var] # pyright: ignore[reportArgumentType]+ @field_validator('foo', mode='wrap') # type: ignore[type-var] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-specialization] @classmethod def invalid_handler(cls, value: Any, handler: int) -> Any: ... @@ -183,7 +183,7 @@ class WrapFieldValidator(BaseModel): class PlainModelSerializer(BaseModel):- @model_serializer # type: ignore[type-var] # pyright: ignore[reportArgumentType]+ @model_serializer # type: ignore[type-var] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-specialization] def too_many_arguments(self, info: SerializationInfo, unrelated: Any) -> Any: ... @model_serializer@@ -200,7 +200,7 @@ class PlainModelSerializer(BaseModel): class WrapModelSerializer(BaseModel):- @model_serializer(mode='wrap') # type: ignore[type-var] # pyright: ignore[reportArgumentType]+ @model_serializer(mode='wrap') # type: ignore[type-var] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-specialization] def no_handler(self) -> Any: ... @model_serializer(mode='wrap')@@ -228,7 +228,7 @@ class PlainFieldSerializer(BaseModel): @field_serializer('a', mode='plain') def valid_method_no_info_2(self, value: Any) -> Any: ... - @field_serializer('a', mode='plain') # type: ignore[type-var] # pyright: ignore[reportArgumentType]+ @field_serializer('a', mode='plain') # type: ignore[type-var] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-specialization] def invalid_method_info_1(self, value: Any, info: int) -> Any: ... @field_serializer('a', mode='plain')@@ -292,7 +292,7 @@ class WrapFieldSerializer(BaseModel): `pydantic_core.core_schema.GeneralWrapNoInfoSerializerFunction`. """ - @field_serializer('a', mode='wrap') # type: ignore[type-var] # pyright: ignore[reportArgumentType]+ @field_serializer('a', mode='wrap') # type: ignore[type-var] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-specialization] @staticmethod def staticmethod_no_handler(value: Any) -> Any: ... tests/typechecking/fields.pyindex de2e12c0b..5b2ad3592 100644@@ -16,14 +16,14 @@ def new_list() -> list[int]: class Model(BaseModel): # `default` and `default_factory` are mutually exclusive:- f1: int = Field(default=1, default_factory=int) # type: ignore[call-overload] # pyright: ignore[reportCallIssue]+ f1: int = Field(default=1, default_factory=int) # type: ignore[call-overload] # pyright: ignore[reportCallIssue] # pyrefly: ignore[no-matching-overload] # `default` and `default_factory` matches the annotation:- f2: int = Field(default='1') # type: ignore[assignment] # pyright: ignore[reportAssignmentType]- f3: int = Field(default_factory=str) # type: ignore[assignment] # pyright: ignore[reportAssignmentType]+ f2: int = Field(default='1') # type: ignore[assignment] # pyright: ignore[reportAssignmentType] # pyrefly: ignore[bad-assignment]+ f3: int = Field(default_factory=str) # type: ignore[assignment] # pyright: ignore[reportAssignmentType] # pyrefly: ignore[bad-assignment] - f4: int = PrivateAttr(default='1') # type: ignore[assignment] # pyright: ignore[reportAssignmentType]- f5: int = PrivateAttr(default_factory=str) # type: ignore[assignment] # pyright: ignore[reportAssignmentType]+ f4: int = PrivateAttr(default='1') # type: ignore[assignment] # pyright: ignore[reportAssignmentType] # pyrefly: ignore[bad-assignment]+ f5: int = PrivateAttr(default_factory=str) # type: ignore[assignment] # pyright: ignore[reportAssignmentType] # pyrefly: ignore[bad-assignment] f6: list[str] = Field(default_factory=list) f7: list[int] = Field(default_factory=new_list)@@ -32,8 +32,8 @@ class Model(BaseModel): f10: int = Field(default_factory=lambda: 123) # Note: mypy may require a different error code for `f12` (see https://github.com/python/mypy/issues/17986).- f11: list[str] = Field(default_factory=new_list) # type: ignore[arg-type] # pyright: ignore[reportAssignmentType]- f12: int = Field(default_factory=list) # type: ignore[arg-type, assignment, unused-ignore] # pyright: ignore[reportAssignmentType]+ f11: list[str] = Field(default_factory=new_list) # type: ignore[arg-type] # pyright: ignore[reportAssignmentType] # pyrefly: ignore[bad-assignment]+ f12: int = Field(default_factory=list) # type: ignore[arg-type, assignment, unused-ignore] # pyright: ignore[reportAssignmentType] # pyrefly: ignore[bad-assignment] # Do not error on the ellipsis: f13: int = Field(...)@@ -41,5 +41,5 @@ class Model(BaseModel): # Do not error for invalid assignments when validate_default=True f14: int = Field(default='1', validate_default=True) f15: int = Field(default_factory=str, validate_default=True)- f16: int = Field(default='1', validate_default=False) # type: ignore[assignment] # pyright: ignore[reportAssignmentType]- f17: int = Field(default_factory=str, validate_default=False) # type: ignore[assignment] # pyright: ignore[reportAssignmentType]+ f16: int = Field(default='1', validate_default=False) # type: ignore[assignment] # pyright: ignore[reportAssignmentType] # pyrefly: ignore[bad-assignment]+ f17: int = Field(default_factory=str, validate_default=False) # type: ignore[assignment] # pyright: ignore[reportAssignmentType] # pyrefly: ignore[bad-assignment]tests/typechecking/json_schema_examples.pyindex ac6ec4d5c..3c1c7758a 100644@@ -1,4 +1,4 @@ from pydantic.json_schema import Examples e_good = Examples([])-e_deprecated = Examples({}) # type: ignore[deprecated] # pyright: ignore[reportDeprecated]+e_deprecated = Examples({}) # type: ignore[deprecated] # pyright: ignore[reportDeprecated] # pyrefly: ignore[deprecated]tests/typechecking/pipeline_api.pyindex ecf0e254e..4f295698c 100644@@ -21,7 +21,7 @@ a6 = Annotated[ ), ] -# Annotated types (e.g. NewPath, FilePath) should be accepted by validate_as.-# Fixes https://github.com/pydantic/pydantic/issues/12845+# TypeForm support: a7 = Annotated[Path, validate_as(NewPath)] a8 = Annotated[Path, validate_as(FilePath)]+a9 = Annotated[int | str, validate_as(int | str)]tests/typechecking/pyproject.tomlindex 0e505676b..03eb40412 100644@@ -1,12 +1,20 @@ [tool.pyright] extraPaths = ['../..'] pythonVersion = '3.10'-enableExperimentalFeatures = true enableTypeIgnoreComments = false reportUnnecessaryTypeIgnoreComment = true reportDeprecated = true reportUnusedExpression = false +[tool.pyrefly]+search-path = ['../..']+python-version = '3.10'+enabled-ignores = ['pyrefly']++[tool.pyrefly.errors]+deprecated = 'error'+unused-ignore = 'error'+ [tool.mypy] python_version = '3.10' disable_error_code = ['empty-body']tests/typechecking/root_model.pyindex 1149472b5..6502968ae 100644@@ -5,7 +5,7 @@ from pydantic import RootModel IntRootModel = RootModel[int] int_root_model = IntRootModel(1)-bad_root_model = IntRootModel('1') # type: ignore[arg-type] # pyright: ignore[reportArgumentType]+bad_root_model = IntRootModel('1') # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-argument-type] assert_type(int_root_model.root, int) tests/typechecking/type_adapter.pyindex 042b1c52e..110e3fb2b 100644@@ -1,7 +1,6 @@-# to be removed with PEP 747:-# mypy: disable_error_code=var-annotated-from typing import Annotated+from typing import Annotated, Union +from pydantic_core import MISSING from typing_extensions import assert_type from pydantic import TypeAdapter@@ -11,17 +10,29 @@ assert_type(ta1, TypeAdapter[int]) assert_type(ta1.validate_python('1'), int) ta1.dump_python(1)-ta1.dump_python('1') # type: ignore[arg-type] # pyright: ignore[reportArgumentType]+ta1.dump_python('1') # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-argument-type] ta1.dump_json(1)-ta1.dump_json('1') # type: ignore[arg-type] # pyright: ignore[reportArgumentType]+ta1.dump_json('1') # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-argument-type] -# The following use cases require PEP 747: TypeExpr:+# The following use cases are for ensuring `TypeForm` works as expected: ta2 = TypeAdapter(Annotated[int, ...])-assert_type(ta2, TypeAdapter[int]) # type: ignore[assert-type] # pyright: ignore[reportAssertTypeFailure]+assert_type(ta2, TypeAdapter[int])+assert_type(ta2.validate_python(...), int) ta3: TypeAdapter[int] = TypeAdapter(Annotated[int, ...]) assert_type(ta3, TypeAdapter[int])+assert_type(ta3.validate_python(...), int) ta4 = TypeAdapter(int | str)-assert_type(ta4, TypeAdapter[int | str]) # type: ignore[assert-type] # pyright: ignore[reportAssertTypeFailure]+assert_type(ta4, TypeAdapter[int | str])+assert_type(ta4.validate_python(...), int | str)++ta5 = TypeAdapter(Union[int, str]) # noqa: UP007+assert_type(ta5, TypeAdapter[int | str])+assert_type(ta5.validate_python(...), int | str)++# Mypy and Pyrefly don't support sentinels mixed with TypeForm (https://github.com/facebook/pyrefly/issues/4865):+ta6 = TypeAdapter(MISSING) # type: ignore[arg-type, var-annotated] # pyrefly: ignore[bad-argument-type]+assert_type(ta6, TypeAdapter[MISSING]) # type: ignore[assert-type, valid-type] # pyrefly: ignore[assert-type]+assert_type(ta6.validate_python(...), MISSING) # type: ignore[assert-type, valid-type] # pyrefly: ignore[assert-type]tests/typechecking/type_form.pynew file mode 100644index 000000000..296e1fca0@@ -0,0 +1,19 @@+from typing import Annotated++from pydantic import ValidateAs, create_model, field_serializer++Model = create_model(+ 'Model',+ f1=int | str,+ f2=(Annotated[int, ...], 1),+)+++def hook_1(v: int | str): ...+++ValidateAs(int | str, hook_1)+ValidateAs(Annotated[float, ...], hook_1) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-argument-type]+++field_serializer('a', return_type=int | str)tests/typechecking/validate_call.pyindex f5f2666dc..9e81bb9c5 100644@@ -11,10 +11,10 @@ def foo(a: int, *, c: str = 'x') -> str: a = foo(1, c='a') assert_type(a, str) -foo('', c=1) # type: ignore[arg-type] # pyright: ignore[reportArgumentType]+foo('', c=1) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # pyrefly: ignore[bad-argument-type] # Not possible to type check currently (see https://github.com/pydantic/pydantic/issues/9883):-foo.raw_function(1, c='a') # type: ignore[attr-defined] # pyright: ignore[reportFunctionMemberAccess]+foo.raw_function(1, c='a') # type: ignore[attr-defined] # pyright: ignore[reportFunctionMemberAccess] # pyrefly: ignore[missing-attribute] # Should work even when not used as a bare decorator:tests/typechecking/with_config_decorator.pyindex 23e484789..e9a8f4923 100644@@ -15,7 +15,7 @@ class Model2(TypedDict): pass -@with_config(config=ConfigDict(str_to_lower=True)) # type: ignore[deprecated] # pyright: ignore[reportDeprecated]+@with_config(config=ConfigDict(str_to_lower=True)) # type: ignore[deprecated] # pyright: ignore[reportDeprecated] # pyrefly: ignore[deprecated] class Model3(TypedDict): pass uv.lockindex 6cea91b18..c8b479cfd 100644@@ -2915,18 +2915,21 @@ wheels = [ [[package]] name = "pyrefly"-version = "0.27.0"+version = "1.2.0" source = { registry = "https://pypi.org/simple" }-sdist = { url = "https://files.pythonhosted.org/packages/21/d1/166ce5f5e1e6de8cfcc842d09dae187666a72d76fd2d6db4dff07bcac8c2/pyrefly-0.27.0.tar.gz", hash = "sha256:296671a94b40d91f136575b9fa9458801a747702581cbdb9e971da69f916b4a8", size = 1198185, upload-time = "2025-08-05T03:58:54.696Z" }-wheels = [- { url = "https://files.pythonhosted.org/packages/1f/42/02b2092af809b5ddb790a44b009036c2fa5e69a52a84b743e74d369bfd70/pyrefly-0.27.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ad896c2387ff748ed236b9b4ddb0802d2b939947ce7ac1a6c6c67c217d20a958", size = 6305827, upload-time = "2025-08-05T03:58:39.092Z" },- { url = "https://files.pythonhosted.org/packages/7a/e2/d4ca7ed11d88c6a3cbe9f875a680bb391a3d067089a2b68804dd76d8aceb/pyrefly-0.27.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:06651386b1ce7a40d2bcfcdfded5fb6d53279abffe9aefd4cb1b9720a6c7c77c", size = 5875353, upload-time = "2025-08-05T03:58:41.439Z" },- { url = "https://files.pythonhosted.org/packages/c0/0f/cd0a910782e7c12dfa19d60052c92e6cc54845b1804621167fa3d619d241/pyrefly-0.27.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:12c79a8b19e32441289623d6c8c51aeddb2e81f692492f4bb8e5d405dae9b499", size = 6102678, upload-time = "2025-08-05T03:58:43.228Z" },- { url = "https://files.pythonhosted.org/packages/6f/4c/068e56e89fae1458f82f9acaf59df53646e7b79725275115440ab015e6b2/pyrefly-0.27.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:199221de8f2832cbeb54f9693c0897c1201c6c602b7b3972964a201c355cb75d", size = 6859138, upload-time = "2025-08-05T03:58:44.809Z" },- { url = "https://files.pythonhosted.org/packages/ef/1c/a3ec3679f8908994ba4813962e4439e1f538f2159f69483cf5e1e76d4949/pyrefly-0.27.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1086562e4d235114f81fb21b275a3b79377742af90fdde2cf9310f189a21bf1e", size = 6573841, upload-time = "2025-08-05T03:58:46.68Z" },- { url = "https://files.pythonhosted.org/packages/9e/a8/be7338b925f5d8b1ea16cb9d4ab8fcac94c4f7d0a0d7b5f7e3b61e83f3f6/pyrefly-0.27.0-py3-none-win32.whl", hash = "sha256:9cb3244d0eb1bc61192160e963769554696f50ee940b79ce9812e48fbb55ca1c", size = 6096735, upload-time = "2025-08-05T03:58:49.06Z" },- { url = "https://files.pythonhosted.org/packages/93/72/55cb0d24875ebd97d43d387777483c58f5942cab02ebecc83d8c52ca47f4/pyrefly-0.27.0-py3-none-win_amd64.whl", hash = "sha256:a93a14915fc3c1ffb7fe0441ac82821494c4fdf70a435b6ae9d1e95d27c2e5ef", size = 6491631, upload-time = "2025-08-05T03:58:50.93Z" },- { url = "https://files.pythonhosted.org/packages/74/c7/288c464ce5e8ec9c78259437901aac6ebe48b113e0e9bce9a7d8d4226284/pyrefly-0.27.0-py3-none-win_arm64.whl", hash = "sha256:8a0e869beed7517066f3ee8390f1978dde29a8d92fb56ea414af43eb87b28b22", size = 6140536, upload-time = "2025-08-05T03:58:52.936Z" },+sdist = { url = "https://files.pythonhosted.org/packages/89/01/a86e9f24722b095c3f88e3616132b75a21b0df53804bdc6a45314dd4d93c/pyrefly-1.2.0.tar.gz", hash = "sha256:5485f960fc2481617068c918335c39ab1507ef90b6b5bd35bf57726e60e73185", size = 6243654, upload-time = "2026-08-01T02:56:27.592Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/7d/9d/3c0ef1d4843987b22f996ed381ec9cf5a3b1273e29804db276252e4c95eb/pyrefly-1.2.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:7f46d983ac49ddd2b043694960a01dc6a19a5cfd8eec609d6bd9c42866f91b4e", size = 14026305, upload-time = "2026-08-01T02:56:02.611Z" },+ { url = "https://files.pythonhosted.org/packages/0a/06/03bbb78fbea54cdc65b626619f3597d5611aca4fdef11e72a4e8360e7e63/pyrefly-1.2.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:756f669b5555090f5c1a4fef30db1785fabe657764f7e4e6dc88994dfb8ca82d", size = 13463880, upload-time = "2026-08-01T02:56:04.93Z" },+ { url = "https://files.pythonhosted.org/packages/13/5a/7d8bc00a38e93bbc9c3e7bd14d305f7948717e667c9bcddeab9dd42fd255/pyrefly-1.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3465812ce5ef4781fb592edbf2724547296f0a3124be115d73c7e8b2401862d", size = 13907329, upload-time = "2026-08-01T02:56:07.104Z" },+ { url = "https://files.pythonhosted.org/packages/be/94/9e08b4bf799d0b8f36b55a2783c7ba5f51730cf0632a85a67b5b5ed876cd/pyrefly-1.2.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5de7b2ad2bba5c8055181681a84b74143eac2234a48ba5d1b7ed7e7a722b02bd", size = 15039020, upload-time = "2026-08-01T02:56:09.208Z" },+ { url = "https://files.pythonhosted.org/packages/5b/bd/bca5fd0c80f4daf8ee6903a29df9f3de1feb05ff0946b8f35ec8c5096b13/pyrefly-1.2.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:25822ea9505f589ea8a725e4268b475132fb89e038fbf092e446510443ac142a", size = 14986199, upload-time = "2026-08-01T02:56:11.924Z" },+ { url = "https://files.pythonhosted.org/packages/97/f7/f07087f3d185ad2eced0c56cef89ca5474dfb4ff25f146cd50a861c97553/pyrefly-1.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90efe75e17491ef5d636e10469e9278d7d0256b3b4c5e1f4750069bf3ae0f5d1", size = 14393715, upload-time = "2026-08-01T02:56:14.143Z" },+ { url = "https://files.pythonhosted.org/packages/d3/70/0d142c320e284b9e3ce35e9b1e58b8ce2ee1f578f2a7234bc30e5022b94f/pyrefly-1.2.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:368aaf7eee4f511ddc0f8e564cf14e01ab2f10b0db9105c6d5b153bf498d07bf", size = 13933008, upload-time = "2026-08-01T02:56:16.525Z" },+ { url = "https://files.pythonhosted.org/packages/5d/e8/e84f11b6e1f63fd453ad3654213b9a0f6f4de8cef6b58038eef2d0d5955d/pyrefly-1.2.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d52d5da7bc65fb7675fbaa80eda879d4f8787c494f04cac21603330d3abbdbbe", size = 14431827, upload-time = "2026-08-01T02:56:18.645Z" },+ { url = "https://files.pythonhosted.org/packages/0f/06/810d31380f66c75e1c0779a408d3b16117b1b368b57894f6aa66bef21686/pyrefly-1.2.0-py3-none-win32.whl", hash = "sha256:8c90751de8506d938e8f802659c74cf35bd7a0036510ee6c634a38eebb280bfa", size = 13229447, upload-time = "2026-08-01T02:56:20.921Z" },+ { url = "https://files.pythonhosted.org/packages/ed/98/4dafa3c7a1caed2dc8cc708dde09ba27963c7736508f55b626fff3024113/pyrefly-1.2.0-py3-none-win_amd64.whl", hash = "sha256:8a8964c224ccc4882730130955815de21ff443c1ac3f0b90685b19bf63848170", size = 14087387, upload-time = "2026-08-01T02:56:23.188Z" },+ { url = "https://files.pythonhosted.org/packages/1b/1c/df3cb0a2e5591660ded7a1836cd2f29dc48c91adb1c0a3a700a96f6d09e1/pyrefly-1.2.0-py3-none-win_arm64.whl", hash = "sha256:3a90bb8df39dfbac74b1f3b2e9d7c526b8f80568884c3944d955023a73ebf61e", size = 13430873, upload-time = "2026-08-01T02:56:25.425Z" }, ] [[package]]