Skip to content

Comments

[ty] Support custom __new__ in enums for value type inference#23448

Draft
rayzeller wants to merge 2 commits intoastral-sh:mainfrom
rayzeller:ty-enum-custom-new
Draft

[ty] Support custom __new__ in enums for value type inference#23448
rayzeller wants to merge 2 commits intoastral-sh:mainfrom
rayzeller:ty-enum-custom-new

Conversation

@rayzeller
Copy link
Contributor

@rayzeller rayzeller commented Feb 20, 2026

Summary

Enums with a custom __new__ unpack their assigned values as arguments and explicitly set _value_ inside the method body. Previously, ty inferred the raw assignment type as the member's value (e.g. tuple[float, float] instead of float), producing incorrect .value types.

This PR follows pyright's pragmatic approach: when a custom __new__ is detected, don't analyze its body — instead fall back to Any.

Note: _value_ annotation lookup was initially included but has been stripped to avoid overlap with #22228, which handles _value_ semantics more broadly and is being actively reviewed by core maintainers.

Example

class Planet(Enum):
    def __new__(cls, mass: float, radius: float) -> "Planet":
        obj = object.__new__(cls)
        obj._value_ = mass
        return obj

    MERCURY = (3.303e+23, 2.4397e6)

# Before: tuple[float, float]
# After:  Any
reveal_type(Planet.MERCURY.value)

What changed

  • Added has_custom_enum_new() — walks the MRO to detect custom __new__, skipping known stdlib classes and stub-file definitions (e.g. IntEnum.__new__, IntFlag.__new__)
  • Modified enum_metadata() to override member value types with Any when custom __new__ is present

What's unaffected

  • Custom __init__ without __new__ — value inference unchanged
  • Exhaustiveness checking, .name access, member detection — all still work
  • IntEnum, StrEnum, standard enums — no behavior change

Partial fix for astral-sh/ty#876

Test plan

New mdtest section in enums.md with 6 test cases: custom __new__ with tuple values, __init__-only regression, inherited __new__ via MRO, standard enum regression, IntEnum not affected, member detection, and exhaustiveness.

🤖 Generated with Claude Code

When an enum defines a custom `__new__`, the raw assignment type doesn't
represent the member's value — `__new__` unpacks arguments and explicitly
sets `_value_`. Fall back to the `_value_` annotation type if declared,
or `Any` otherwise.

Closes: astral-sh/ty#876 (partial — "Custom `__new__` or `__init__` methods in enums")

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 20, 2026

Typing conformance results

No changes detected ✅

@ntBre ntBre added the ty Multi-file analysis & type inference label Feb 20, 2026
@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 20, 2026

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 20, 2026

mypy_primer results

Changes were detected when running on open source projects
spack (https://github.com/spack/spack)
- lib/spack/spack/detection/path.py:169:33: error[invalid-argument-type] Argument to function `dedupe_paths` is incorrect: Expected `list[str]`, found `Unknown | list[int | Unknown | str | ... omitted 3 union elements]`
+ lib/spack/spack/detection/path.py:169:33: error[invalid-argument-type] Argument to function `dedupe_paths` is incorrect: Expected `list[str]`, found `Unknown | list[int | str | bytes | ... omitted 3 union elements]`
- lib/spack/spack/llnl/util/filesystem.py:1668:35: error[invalid-argument-type] Argument to function `exists` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `Sized | Unknown`
+ lib/spack/spack/llnl/util/filesystem.py:1668:35: error[invalid-argument-type] Argument to function `exists` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `Unknown | Sized`
- lib/spack/spack/llnl/util/filesystem.py:1674:25: error[invalid-argument-type] Argument to function `move` is incorrect: Expected `str | PathLike[str]`, found `Sized | Unknown`
+ lib/spack/spack/llnl/util/filesystem.py:1674:25: error[invalid-argument-type] Argument to function `move` is incorrect: Expected `str | PathLike[str]`, found `Unknown | Sized`

pylint (https://github.com/pycqa/pylint)
- pylint/checkers/refactoring/implicit_booleaness_checker.py:219:24: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `str | Unknown`
+ pylint/checkers/refactoring/implicit_booleaness_checker.py:219:24: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `Unknown | str`
- pylint/checkers/refactoring/implicit_booleaness_checker.py:219:62: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `str | Unknown`
+ pylint/checkers/refactoring/implicit_booleaness_checker.py:219:62: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `Unknown | str`
- pylint/checkers/refactoring/implicit_booleaness_checker.py:222:27: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `str | (Unknown & ~None)`
+ pylint/checkers/refactoring/implicit_booleaness_checker.py:222:27: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `(Unknown & ~None) | str`
- pylint/checkers/refactoring/implicit_booleaness_checker.py:236:29: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `str | Unknown`
+ pylint/checkers/refactoring/implicit_booleaness_checker.py:236:29: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `Unknown | str`
- pylint/checkers/refactoring/implicit_booleaness_checker.py:239:29: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `str | Unknown`
+ pylint/checkers/refactoring/implicit_booleaness_checker.py:239:29: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `Unknown | str`

rich (https://github.com/Textualize/rich)
- tests/test_tools.py:17:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
+ tests/test_tools.py:17:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
- tests/test_tools.py:18:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
+ tests/test_tools.py:18:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
- tests/test_tools.py:19:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
+ tests/test_tools.py:19:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
- tests/test_tools.py:20:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
+ tests/test_tools.py:20:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`

porcupine (https://github.com/Akuli/porcupine)
- porcupine/pluginmanager.py:133:49: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Never]`, found `Unknown | str`
- Found 25 diagnostics
+ Found 24 diagnostics

Expression (https://github.com/cognitedata/Expression)
+ tests/test_compose.py:21:16: error[invalid-assignment] Object of type `(Never, /) -> Never` is not assignable to `(int, /) -> int`
- Found 204 diagnostics
+ Found 205 diagnostics

vision (https://github.com/pytorch/vision)
- test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`

cloud-init (https://github.com/canonical/cloud-init)
- tests/unittests/distros/test_user_data_normalize.py:24:31: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | dict[Unknown | str, Unknown | str] | str | ... omitted 3 union elements`
+ tests/unittests/distros/test_user_data_normalize.py:24:31: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | bool | list[Unknown] | ... omitted 3 union elements`
- tests/unittests/sources/test_gce.py:71:31: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | dict[Unknown | str, Unknown | str] | str | ... omitted 3 union elements`
+ tests/unittests/sources/test_gce.py:71:31: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | bool | list[Unknown] | ... omitted 3 union elements`

prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-docker/tests/test_containers.py:26:31: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:41:26: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:54:31: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:67:31: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-docker/tests/test_containers.py:80:31: error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | bool | dict[Unknown | str, Unknown | int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected `str | list[str] | None`, found `str | bool | dict[Unknown | str, Unknown | int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool | dict[Unknown | str, Unknown | int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected `bool | None`, found `str | bool | dict[Unknown | str, Unknown | int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected `str | list[str] | None`, found `str | bool | dict[Unknown | str, Unknown | int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, str] | list[str] | None`, found `str | bool | dict[Unknown | str, Unknown | int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:27:47: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str | bool | dict[Unknown | str, Unknown | int] | None`
+ src/integrations/prefect-docker/tests/test_containers.py:42:47: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_containers.py:55:47: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_containers.py:68:47: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_containers.py:81:47: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
- src/integrations/prefect-docker/tests/test_images.py:16:23: error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected `DockerHost | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected `DockerRegistryCredentials | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:16:44: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str | bool`
- src/integrations/prefect-docker/tests/test_images.py:28:27: error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_images.py:29:47: error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:29:47: error[invalid-argument-type] Argument is incorrect: Expected `DockerRegistryCredentials | None`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:29:47: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:31:16: error[unresolved-attribute] Attribute `id` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`
- src/integrations/prefect-docker/tests/test_images.py:48:27: error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_images.py:51:17: error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str`
- src/integrations/prefect-docker/tests/test_images.py:63:28: error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-docker/tests/test_images.py:51:17: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
+ src/integrations/prefect-docker/tests/test_images.py:53:16: error[unresolved-attribute] Attribute `id` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`
+ src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected `DockerRegistryCredentials | None`, found `str | bool`
+ src/integrations/prefect-docker/tests/test_images.py:64:47: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str | bool`
- src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:425:33: error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:428:17: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `str`
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:16:15: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:24:15: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:33:15: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:46:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:98:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:144:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:190:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:236:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:274:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_custom_objects.py:332:11: error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:20:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `None`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:29:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `None`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:38:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `None`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:57:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:103:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:149:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:195:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:240:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:286:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_custom_objects.py:344:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/integrations/prefect-kubernetes/tests/test_deployments.py:16:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:34:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:68:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:88:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:110:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_deployments.py:137:11: error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:18:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:38:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:70:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:92:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:113:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_deployments.py:141:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/integrations/prefect-kubernetes/tests/test_jobs.py:34:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:50:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:66:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:84:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:104:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:127:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_jobs.py:156:11: error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:36:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:52:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:68:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:87:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:107:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:131:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_jobs.py:159:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/integrations/prefect-kubernetes/tests/test_pods.py:27:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:42:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:76:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:92:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:112:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:133:11: error[invalid-await] `object` is not awaitable
- src/integrations/prefect-kubernetes/tests/test_pods.py:163:11: error[invalid-await] `object` is not awaitable
+ src/integrations/prefect-kubernetes/tests/test_pods.py:29:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:46:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:78:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:96:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:115:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:137:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
+ src/integrations/prefect-kubernetes/tests/test_pods.py:167:9: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Any]`, found `Literal["test"]`
- src/prefect/cache_policies.py:311:25: error[unresolved-attribute] Attribute `__code__` is not defined on `((...) -> Any) & ((*args: object, **kwargs: object) -> object)` in union `Unknown | (((...) -> Any) & ((*args: object, **kwargs: object) -> object))`
+ src/prefect/cache_policies.py:311:25: error[unresolved-attribute] Attribute `__code__` is not defined on `(...) -> Any` in union `Unknown | ((...) -> Any)`
- src/prefect/deployments/runner.py:1017:70: error[unresolved-attribute] Attribute `__name__` is not defined on `((...) -> Any) & ((*args: object, **kwargs: object) -> object)` in union `Unknown | (((...) -> Any) & ((*args: object, **kwargs: object) -> object))`
+ src/prefect/deployments/runner.py:1017:70: error[unresolved-attribute] Attribute `__name__` is not defined on `(...) -> Any` in union `Unknown | ((...) -> Any)`
+ src/prefect/flow_engine.py:1004:32: error[invalid-await] `Unknown | R@FlowRunEngine | Coroutine[Any, Any, R@FlowRunEngine]` is not awaitable
+ src/prefect/flow_engine.py:1610:24: error[invalid-await] `Unknown | R@AsyncFlowRunEngine | Coroutine[Any, Any, R@AsyncFlowRunEngine]` is not awaitable
- src/prefect/flows.py:286:34: error[unresolved-attribute] Object of type `((**P@Flow) -> R@Flow) & ((*args: object, **kwargs: object) -> object)` has no attribute `__name__`
+ src/prefect/flows.py:286:34: error[unresolved-attribute] Object of type `(**P@Flow) -> R@Flow` has no attribute `__name__`
- src/prefect/flows.py:404:68: error[unresolved-attribute] Object of type `((**P@Flow) -> R@Flow) & ((*args: object, **kwargs: object) -> object)` has no attribute `__name__`
+ src/prefect/flows.py:404:68: error[unresolved-attribute] Object of type `(**P@Flow) -> R@Flow` has no attribute `__name__`
+ src/prefect/task_engine.py:1642:28: error[invalid-await] `Unknown | R@AsyncTaskRunEngine | Coroutine[Any, Any, R@AsyncTaskRunEngine]` is not awaitable
- src/prefect/tasks.py:185:9: error[unresolved-attribute] Attribute `__code__` is not defined on `((...) -> Any) & ((*args: object, **kwargs: object) -> object)` in union `Unknown | (((...) -> Any) & ((*args: object, **kwargs: object) -> object))`
+ src/prefect/tasks.py:185:9: error[unresolved-attribute] Attribute `__code__` is not defined on `(...) -> Any` in union `Unknown | ((...) -> Any)`
- src/prefect/tasks.py:795:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(() -> str) | TaskRunNameCallbackWithParameters | str | None`, found `((() -> str) & ~<class 'NotSet'>) | TaskRunNameCallbackWithParameters | str | ... omitted 4 union elements`
+ src/prefect/tasks.py:795:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(() -> str) | TaskRunNameCallbackWithParameters | str | None`, found `(() -> str) | TaskRunNameCallbackWithParameters | str | ... omitted 3 union elements`
- src/prefect/utilities/_engine.py:64:13: error[invalid-argument-type] Argument to bound method `is_callback_with_parameters` is incorrect: Expected `(...) -> str`, found `(Unknown & Top[(...) -> object]) | (str & Top[(...) -> object]) | ((() -> str) & ((*args: object, **kwargs: object) -> object)) | (TaskRunNameCallbackWithParameters & ((*args: object, **kwargs: object) -> object))`
+ src/prefect/utilities/_engine.py:64:13: error[invalid-argument-type] Argument to bound method `is_callback_with_parameters` is incorrect: Expected `(...) -> str`, found `(Unknown & Top[(...) -> object]) | (str & Top[(...) -> object]) | (() -> str) | TaskRunNameCallbackWithParameters`
+ src/prefect/utilities/_engine.py:66:48: error[unknown-argument] Argument `parameters` does not match any known parameter
- src/prefect/utilities/_engine.py:85:12: error[invalid-return-type] Return type does not match returned value: expected `str`, found `object`
+ src/prefect/utilities/_engine.py:69:29: error[missing-argument] No argument provided for required parameter `parameters` of bound method `__call__`
- Found 5855 diagnostics
+ Found 5881 diagnostics

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
- src/scikit_build_core/build/wheel.py:99:20: error[no-matching-overload] No overload of bound method `__init__` matches arguments
- Found 52 diagnostics
+ Found 51 diagnostics

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- scripts/freshvenvs.py:343:69: error[invalid-argument-type] Argument to function `_versions_fully_cover_bounds` is incorrect: Expected `list[str]`, found `list[Unknown | Version] & ~AlwaysFalsy`
+ scripts/freshvenvs.py:343:69: error[invalid-argument-type] Argument to function `_versions_fully_cover_bounds` is incorrect: Expected `list[str]`, found `list[Version | Unknown] & ~AlwaysFalsy`
- tests/tracer/test_span.py:193:29: error[invalid-argument-type] Argument to bound method `set_metric` is incorrect: Expected `int | float`, found `Span | Unknown | None | ... omitted 6 union elements`
+ tests/tracer/test_span.py:193:29: error[invalid-argument-type] Argument to bound method `set_metric` is incorrect: Expected `int | float`, found `str | Unknown | None | ... omitted 6 union elements`

ibis (https://github.com/ibis-project/ibis)
- ibis/selectors.py:333:16: error[invalid-return-type] Return type does not match returned value: expected `frozenset[str]`, found `frozenset[str | Unknown | Buffer]`
+ ibis/selectors.py:333:16: error[invalid-return-type] Return type does not match returned value: expected `frozenset[str]`, found `frozenset[Unknown | str | Buffer]`
- ibis/selectors.py:428:13: error[invalid-assignment] Object of type `frozenset[str | Unknown]` is not assignable to `tuple[str | Column, ...]`
+ ibis/selectors.py:428:13: error[invalid-assignment] Object of type `frozenset[Unknown | str]` is not assignable to `tuple[str | Column, ...]`

bokeh (https://github.com/bokeh/bokeh)
- src/bokeh/layouts.py:670:21: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[L@_parse_children_arg]`, found `tuple[L@_parse_children_arg | list[L@_parse_children_arg], ...]`
+ src/bokeh/layouts.py:670:16: error[invalid-return-type] Return type does not match returned value: expected `list[L@_parse_children_arg]`, found `list[L@_parse_children_arg | list[L@_parse_children_arg]]`

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/methods/describe.py:215:21: error[not-iterable] Object of type `Unknown | Sized` may not be iterable
+ pandas/core/methods/describe.py:215:21: error[not-iterable] Object of type `Sized | Unknown` may not be iterable

materialize (https://github.com/MaterializeInc/materialize)
+ misc/python/materialize/cli/mz_workload_anonymize.py:251:13: error[no-matching-overload] No overload of bound method `join` matches arguments
- Found 525 diagnostics
+ Found 526 diagnostics

static-frame (https://github.com/static-frame/static-frame)
- static_frame/test/unit/test_frame_iter.py:1389:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1389:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1397:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1397:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1408:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1408:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1411:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1411:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1431:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1431:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1439:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1439:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1481:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1481:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1489:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1489:13: error[unresolved-attribute] Attribute `to_pairs` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1549:26: error[unresolved-attribute] Attribute `tolist` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1549:26: error[unresolved-attribute] Attribute `tolist` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1550:26: error[unresolved-attribute] Attribute `tolist` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1550:26: error[unresolved-attribute] Attribute `tolist` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1553:26: error[unresolved-attribute] Attribute `tolist` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1553:26: error[unresolved-attribute] Attribute `tolist` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1554:26: error[unresolved-attribute] Attribute `tolist` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1554:26: error[unresolved-attribute] Attribute `tolist` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`
- static_frame/test/unit/test_frame_iter.py:1684:29: error[unresolved-attribute] Attribute `shape` is not defined on `tuple[Any, Any]` in union `Any | tuple[Any, Any]`
+ static_frame/test/unit/test_frame_iter.py:1684:29: error[unresolved-attribute] Attribute `shape` is not defined on `tuple[Any, Any]` in union `tuple[Any, Any] | Any`

scikit-learn (https://github.com/scikit-learn/scikit-learn)
- sklearn/externals/array_api_compat/common/_linalg.py:113:15: error[unresolved-attribute] Attribute `max` is not defined on `tuple[Any, ...]` in union `tuple[Any, ...] | Any`
+ sklearn/externals/array_api_compat/common/_linalg.py:113:15: error[unresolved-attribute] Attribute `max` is not defined on `tuple[Any, ...]` in union `Any | tuple[Any, ...]`
- sklearn/externals/array_api_compat/common/_linalg.py:113:76: error[unresolved-attribute] Attribute `dtype` is not defined on `tuple[Any, ...]` in union `tuple[Any, ...] | Any`
+ sklearn/externals/array_api_compat/common/_linalg.py:113:76: error[unresolved-attribute] Attribute `dtype` is not defined on `tuple[Any, ...]` in union `Any | tuple[Any, ...]`
- sklearn/externals/array_api_compat/common/_linalg.py:117:15: error[unresolved-attribute] Attribute `max` is not defined on `tuple[Any, ...]` in union `tuple[Any, ...] | Any`
+ sklearn/externals/array_api_compat/common/_linalg.py:117:15: error[unresolved-attribute] Attribute `max` is not defined on `tuple[Any, ...]` in union `Any | tuple[Any, ...]`

rotki (https://github.com/rotki/rotki)
- rotkehlchen/tests/unit/test_makerdao.py:170:9: error[invalid-argument-type] Argument is incorrect: Expected `defaultdict[Asset, defaultdict[str, Balance]]`, found `defaultdict[Asset | Unknown, defaultdict[str, Balance] | Balance | Unknown | dict[Unknown | str, Unknown | Balance]]`
+ rotkehlchen/tests/unit/test_makerdao.py:170:9: error[invalid-argument-type] Argument is incorrect: Expected `defaultdict[Asset, defaultdict[str, Balance]]`, found `defaultdict[Asset | Unknown, defaultdict[str, Balance] | Balance | dict[Unknown | str, Unknown | Balance] | Unknown]`
- rotkehlchen/tests/unit/test_makerdao.py:171:9: error[invalid-argument-type] Argument is incorrect: Expected `defaultdict[Asset, defaultdict[str, Balance]]`, found `defaultdict[Asset | Unknown, defaultdict[str, Balance] | Balance | Unknown | dict[Unknown | str, Unknown | Balance]]`
+ rotkehlchen/tests/unit/test_makerdao.py:171:9: error[invalid-argument-type] Argument is incorrect: Expected `defaultdict[Asset, defaultdict[str, Balance]]`, found `defaultdict[Asset | Unknown, defaultdict[str, Balance] | Balance | dict[Unknown | str, Unknown | Balance] | Unknown]`

sympy (https://github.com/sympy/sympy)
+ sympy/parsing/mathematica.py:692:38: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Never]`, found `Unknown | list[Unknown | str]`
- sympy/simplify/cse_main.py:299:23: error[not-iterable] Object of type `Unknown | Sized` may not be iterable
+ sympy/simplify/cse_main.py:299:23: error[not-iterable] Object of type `Sized | Unknown` may not be iterable
- sympy/simplify/cse_main.py:305:16: error[unsupported-operator] Operator `in` is not supported between objects of type `Unknown` and `Unknown | Sized`
+ sympy/simplify/cse_main.py:305:16: error[unsupported-operator] Operator `in` is not supported between objects of type `Unknown` and `Sized | Unknown`
- Found 16209 diagnostics
+ Found 16210 diagnostics

jax (https://github.com/google/jax)
- jax/_src/export/_export.py:1377:45: error[invalid-argument-type] Argument to function `_get_named_sharding` is incorrect: Expected `ShapedArray`, found `Unknown | AbstractValue`
+ jax/_src/export/_export.py:1377:45: error[invalid-argument-type] Argument to function `_get_named_sharding` is incorrect: Expected `ShapedArray`, found `AbstractValue | Unknown`
- jax/_src/pallas/hlo_interpreter.py:433:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | DynamicGridDim | Unknown`
+ jax/_src/pallas/hlo_interpreter.py:433:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | Unknown | DynamicGridDim`
- jax/_src/pallas/mosaic/interpret/interpret_pallas_call.py:1895:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | DynamicGridDim | Unknown`
+ jax/_src/pallas/mosaic/interpret/interpret_pallas_call.py:1895:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | Unknown | DynamicGridDim`
- jax/_src/pallas/pallas_call.py:857:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | DynamicGridDim | Unknown`
+ jax/_src/pallas/pallas_call.py:857:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | Unknown | DynamicGridDim`

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- tests/indexes/str/test_add.py:27:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[str | Unknown]` and `Literal[4]`
+ tests/indexes/str/test_add.py:27:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[Unknown | str]` and `Literal[4]`
- tests/indexes/str/test_add.py:28:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[str | Unknown]` and `Literal["right"]`
+ tests/indexes/str/test_add.py:28:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[Unknown | str]` and `Literal["right"]`
- tests/indexes/str/test_add.py:31:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Literal[4]` and `Index[str | Unknown]`
+ tests/indexes/str/test_add.py:31:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Literal[4]` and `Index[Unknown | str]`
- tests/indexes/str/test_add.py:42:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[str | Unknown]` and `list[Unknown | int]`
+ tests/indexes/str/test_add.py:42:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[Unknown | str]` and `list[Unknown | int]`
- tests/indexes/str/test_add.py:43:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[str | Unknown]` and `list[Unknown | str]`
+ tests/indexes/str/test_add.py:43:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[Unknown | str]` and `list[Unknown | str]`
- tests/indexes/str/test_add.py:44:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[str | Unknown]` and `tuple[Unknown | str, ...]`
+ tests/indexes/str/test_add.py:44:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[Unknown | str]` and `tuple[Unknown | str, ...]`
- tests/indexes/str/test_add.py:47:14: error[unsupported-operator] Operator `+` is not supported between objects of type `list[Unknown | int]` and `Index[str | Unknown]`
+ tests/indexes/str/test_add.py:47:14: error[unsupported-operator] Operator `+` is not supported between objects of type `list[Unknown | int]` and `Index[Unknown | str]`
- tests/indexes/str/test_add.py:48:23: error[unsupported-operator] Operator `+` is not supported between objects of type `list[Unknown | str]` and `Index[str | Unknown]`
+ tests/indexes/str/test_add.py:48:23: error[unsupported-operator] Operator `+` is not supported between objects of type `list[Unknown | str]` and `Index[Unknown | str]`
- tests/indexes/str/test_add.py:49:11: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
+ tests/indexes/str/test_add.py:49:11: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
- tests/indexes/str/test_mul.py:31:18: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
+ tests/indexes/str/test_mul.py:31:18: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:304:9: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
+ tests/indexes/test_indexes.py:304:9: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:311:9: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
+ tests/indexes/test_indexes.py:311:9: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:1027:11: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
+ tests/indexes/test_indexes.py:1027:11: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:1028:11: error[type-assertion-failure] Type `str | Unknown` does not match asserted type `str`
+ tests/indexes/test_indexes.py:1028:11: error[type-assertion-failure] Type `Unknown | str` does not match asserted type `str`
- tests/indexes/test_indexes.py:1029:11: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
+ tests/indexes/test_indexes.py:1029:11: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:1335:9: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
+ tests/indexes/test_indexes.py:1335:9: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:1532:11: error[type-assertion-failure] Type `Series[str | Unknown]` does not match asserted type `Series[str]`
+ tests/indexes/test_indexes.py:1532:11: error[type-assertion-failure] Type `Series[Unknown | str]` does not match asserted type `Series[str]`
- tests/test_string_accessors.py:29:11: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
+ tests/test_string_accessors.py:29:11: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
- tests/test_string_accessors.py:30:11: error[type-assertion-failure] Type `Index[bytes | Unknown]` does not match asserted type `Index[bytes]`
+ tests/test_string_accessors.py:30:11: error[type-assertion-failure] Type `Index[Unknown | bytes]` does not match asserted type `Index[bytes]`

…new`

Remove the `_value_` annotation lookup logic to avoid overlap with astral-sh#22228,
which handles `_value_` semantics more broadly. Custom `__new__` enums now
always fall back to `Any`. Also remove the redundant known-class skip list
from `has_custom_enum_new` — the vendored path check already covers all
stdlib classes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants