Skip to content

Update typeshed to 483fd73dcea6f5fbc04ea602e802e798024fa2e2#11416

Merged
bschnurr merged 2 commits into
microsoft:mainfrom
bschnurr:update-typeshed2
May 5, 2026
Merged

Update typeshed to 483fd73dcea6f5fbc04ea602e802e798024fa2e2#11416
bschnurr merged 2 commits into
microsoft:mainfrom
bschnurr:update-typeshed2

Conversation

@bschnurr
Copy link
Copy Markdown
Member

@bschnurr bschnurr commented May 5, 2026

Upstream typeshed update

Failure classification summary

No failures occurred.

  • A — legitimate typeshed behavior change: 0
  • B — Pyright bug revealed by new stubs: 0
  • C — test fragility: 0
  • D — harness/environment issue: 0

Pyright fixes

None required.

Test updates

None required.

Precision report

No reveal_type expectation changes or precision regressions were detected.

Agent configuration

Also fixes custom-agent YAML frontmatter and records that future typeshed-update PRs must target microsoft/pyright, not the fork.

Validation

From packages/pyright-internal:

npm run test:norebuild

Result: 57/57 test suites passed, 2,432/2,432 tests passed.

bschnurr and others added 2 commits May 5, 2026 10:44
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Diff from mypy_primer, showing the effect of this PR on open source code:

sympy (https://github.com/sympy/sympy)
+   .../projects/sympy/sympy/solvers/tests/test_solvers.py:1214:18 - error: Operator "+" not supported for types "Basic" and "Expr" (reportOperatorIssue)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:315:25 - error: "Set" is not iterable
-     "__iter__" method not defined (reportGeneralTypeIssues)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:315:25 - error: "ConditionSet" is not iterable
-     "__iter__" method not defined (reportGeneralTypeIssues)
+   .../projects/sympy/sympy/solvers/tests/test_solveset.py:445:30 - error: Cannot access attribute "limit_denominator" for class "NaN"
+     Attribute "limit_denominator" is unknown (reportAttributeAccessIssue)
+   .../projects/sympy/sympy/solvers/tests/test_solveset.py:445:30 - error: Cannot access attribute "limit_denominator" for class "ComplexInfinity"
+     Attribute "limit_denominator" is unknown (reportAttributeAccessIssue)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2024:20 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2036:20 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2049:20 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2070:16 - error: Argument of type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" cannot be assigned to parameter "obj" of type "Sized" in function "len"
-     Type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" is not assignable to type "Sized"
-       "Set" is incompatible with protocol "Sized"
-         "__len__" is not present (reportArgumentType)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2071:20 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2252:16 - error: Argument of type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" cannot be assigned to parameter "obj" of type "Sized" in function "len"
-     Type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" is not assignable to type "Sized"
-       "Set" is incompatible with protocol "Sized"
-         "__len__" is not present (reportArgumentType)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2333:16 - error: Argument of type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" cannot be assigned to parameter "obj" of type "Sized" in function "len"
-     Type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" is not assignable to type "Sized"
-       "Set" is incompatible with protocol "Sized"
-         "__len__" is not present (reportArgumentType)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2346:16 - error: Argument of type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" cannot be assigned to parameter "obj" of type "Sized" in function "len"
-     Type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" is not assignable to type "Sized"
-       "Set" is incompatible with protocol "Sized"
-         "__len__" is not present (reportArgumentType)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2352:16 - error: Argument of type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" cannot be assigned to parameter "obj" of type "Sized" in function "len"
-     Type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" is not assignable to type "Sized"
-       "Set" is incompatible with protocol "Sized"
-         "__len__" is not present (reportArgumentType)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2519:16 - error: Argument of type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" cannot be assigned to parameter "obj" of type "Sized" in function "len"
-     Type "Unknown | FiniteSet | Set | Intersection | Union | Complement | Any | ConditionSet" is not assignable to type "Sized"
-       "Set" is incompatible with protocol "Sized"
-         "__len__" is not present (reportArgumentType)
-   .../projects/sympy/sympy/solvers/tests/test_solveset.py:2522:20 - error: Argument of type "Unknown | Basic | Any" cannot be assigned to parameter "obj" of type "Sized" in function "len"
-     Type "Unknown | Basic | Any" is not assignable to type "Sized"
-       "Basic" is incompatible with protocol "Sized"
-         "__len__" is not present (reportArgumentType)
+   .../projects/sympy/sympy/stats/crv_types.py:2544:9 - error: Method "_cdf" overrides class "SingleContinuousDistribution" in an incompatible manner
+     Return type mismatch: base method returns type "None", override returns type "ComplexInfinity | NaN | Rational | Unknown | Zero | Expr"
+       Type "ComplexInfinity | NaN | Rational | Unknown | Zero | Expr" is not assignable to type "None"
+         "Expr" is not assignable to "None" (reportIncompatibleMethodOverride)
+   .../projects/sympy/sympy/stats/crv_types.py:2723:9 - error: Method "_cdf" overrides class "SingleContinuousDistribution" in an incompatible manner
+     Return type mismatch: base method returns type "None", override returns type "Expr | NaN | ComplexInfinity | Rational | Unknown | One | NegativeOne | Zero | Integer"
+       Type "Expr | NaN | ComplexInfinity | Rational | Unknown | One | NegativeOne | Zero | Integer" is not assignable to type "None"
+         "Expr" is not assignable to "None" (reportIncompatibleMethodOverride)
-   .../projects/sympy/sympy/stats/drv.py:269:22 - error: Argument of type "Generator[tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | int | None, None, None]" cannot be assigned to parameter "iterable" of type "Iterable[_SupportsSumNoDefaultT@sum]" in function "sum"
+   .../projects/sympy/sympy/stats/drv.py:269:22 - error: Argument of type "Generator[tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | int | None, None, None]" cannot be assigned to parameter "iterable" of type "Iterable[_SupportsSumNoDefaultT@sum]" in function "sum"
-     "Generator[tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | int | None, None, None]" is not assignable to "Iterable[_SupportsSumNoDefaultT@sum]"
+     "Generator[tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | int | None, None, None]" is not assignable to "Iterable[_SupportsSumNoDefaultT@sum]"
-       Type parameter "_T_co@Iterable" is covariant, but "tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | int | None" is not a subtype of "_SupportsSumNoDefaultT@sum"
+       Type parameter "_T_co@Iterable" is covariant, but "tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | int | None" is not a subtype of "_SupportsSumNoDefaultT@sum"
-         Type "tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
+         Type "tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
-           Type "tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
+           Type "tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
-   .../projects/sympy/sympy/stats/drv_types.py:293:16 - error: Operator "*" not supported for types "Expr" and "tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic"
+   .../projects/sympy/sympy/stats/drv_types.py:293:16 - error: Operator "*" not supported for types "Expr" and "tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic"
+   .../projects/sympy/sympy/stats/frv_types.py:139:17 - error: Argument of type "NaN | ComplexInfinity | Rational | Unknown | Expr" cannot be assigned to parameter "value" of type "int" in function "__setitem__"
+     Type "NaN | ComplexInfinity | Rational | Unknown | Expr" is not assignable to type "int"
+       "Expr" is not assignable to "int" (reportArgumentType)
-   .../projects/sympy/sympy/stats/joint_rv_types.py:576:27 - error: Argument of type "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Unknown | Infinity | NegativeInfinity | Float | Number | Expr" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
+   .../projects/sympy/sympy/stats/joint_rv_types.py:576:27 - error: Argument of type "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | Expr" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
-     Type "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Unknown | Infinity | NegativeInfinity | Float | Number | Expr" is not assignable to type "SupportsIndex"
+     Type "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | Expr" is not assignable to type "SupportsIndex"

... (truncated 754 lines) ...

zope.interface (https://github.com/zopefoundation/zope.interface)
-   .../projects/zope.interface/src/zope/interface/common/tests/test_io.py:36:56 - error: Argument of type "StringIO" cannot be assigned to parameter "raw" of type "RawIOBase" in function "__init__"
+   .../projects/zope.interface/src/zope/interface/common/tests/test_io.py:36:56 - error: Argument of type "StringIO" cannot be assigned to parameter "raw" of type "_BufferedWriterStreamT@BufferedWriter" in function "__init__"
-     "StringIO" is not assignable to "RawIOBase" (reportArgumentType)
+     Type "StringIO" is not assignable to type "_BufferedWriterStream"
+       "StringIO" is incompatible with protocol "_BufferedWriterStream"
+         "write" is an incompatible type
+           Type "(s: str, /) -> int" is not assignable to type "(b: WriteableBuffer, /) -> (int | None)"
+             Parameter 1: type "WriteableBuffer" is incompatible with type "str"
+         "_BufferedWriterStream" is not assignable to "StringIO" (reportArgumentType)
-     "BytesIO" is not assignable to "RawIOBase" (reportArgumentType)
-   .../projects/zope.interface/src/zope/interface/common/tests/test_io.py:41:28 - error: Argument of type "BytesIO" cannot be assigned to parameter "writer" of type "RawIOBase" in function "__init__"
- 517 errors, 240 warnings, 0 informations
+ 516 errors, 240 warnings, 0 informations

pytest (https://github.com/pytest-dev/pytest)
-   .../projects/pytest/src/_pytest/pytester.py:1379:31 - error: Argument of type "bytes" cannot be assigned to parameter "s" of type "str" in function "write"
-     "bytes" is not assignable to "str" (reportArgumentType)
- 332 errors, 17 warnings, 0 informations
+ 331 errors, 17 warnings, 0 informations

prefect (https://github.com/PrefectHQ/prefect)
+   .../projects/prefect/src/integrations/prefect-kubernetes/prefect_kubernetes/observer.py:43:43 - error: Type "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to declared type "TTLCache[str, Event, float]"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "TTLCache[str, Event, float]"
+       Type parameter "_KT@TTLCache" is invariant, but "_KT2@__init__" is not the same as "str"
+       Type parameter "_VT@TTLCache" is invariant, but "_VT2@__init__" is not the same as "Event" (reportAssignmentType)
+   .../projects/prefect/src/integrations/prefect-kubernetes/prefect_kubernetes/observer.py:50:65 - error: Type "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to declared type "TTLCache[str, InfrastructureDiagnosis, float]"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "TTLCache[str, InfrastructureDiagnosis, float]"
+       Type parameter "_KT@TTLCache" is invariant, but "_KT2@__init__" is not the same as "str"
+       Type parameter "_VT@TTLCache" is invariant, but "_VT2@__init__" is not the same as "InfrastructureDiagnosis" (reportAssignmentType)
+   .../projects/prefect/src/prefect/_waiters.py:83:73 - error: Cannot assign to attribute "_observed_completed_flow_runs" for class "FlowRunWaiter*"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "TTLCache[UUID, bool, float]"
+       Type parameter "_KT@TTLCache" is invariant, but "_KT2@__init__" is not the same as "UUID"
+       Type parameter "_VT@TTLCache" is invariant, but "_VT2@__init__" is not the same as "bool" (reportAttributeAccessIssue)
+   .../projects/prefect/src/prefect/concurrency/services.py:26:63 - error: Type "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to declared type "TTLCache[frozenset[str], bool, float]"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "TTLCache[frozenset[str], bool, float]"
+       Type parameter "_KT@TTLCache" is invariant, but "_KT2@__init__" is not the same as "frozenset[str]"
+       Type parameter "_VT@TTLCache" is invariant, but "_VT2@__init__" is not the same as "bool" (reportAssignmentType)
+   .../projects/prefect/src/prefect/events/clients.py:691:29 - error: Cannot assign to attribute "_seen_events" for class "PrefectEventSubscriber*"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "MutableMapping[UUID, bool]"
+       Type parameter "_KT@MutableMapping" is invariant, but "_KT2@__init__" is not the same as "UUID"
+       Type parameter "_VT@MutableMapping" is invariant, but "_VT2@__init__" is not the same as "bool" (reportAttributeAccessIssue)
+   .../projects/prefect/src/prefect/logging/clients.py:177:27 - error: Cannot assign to attribute "_seen_logs" for class "PrefectLogsSubscriber*"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "MutableMapping[UUID, bool]"
+       Type parameter "_KT@MutableMapping" is invariant, but "_KT2@__init__" is not the same as "UUID"
+       Type parameter "_VT@MutableMapping" is invariant, but "_VT2@__init__" is not the same as "bool" (reportAttributeAccessIssue)
+   .../projects/prefect/src/prefect/runner/_event_emitter.py:55:43 - error: Cannot assign to attribute "_cache" for class "EventEmitter*"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "TTLCache[str, Any, float]"
+       Type parameter "_KT@TTLCache" is invariant, but "_KT2@__init__" is not the same as "str" (reportAttributeAccessIssue)
+   .../projects/prefect/src/prefect/server/api/collections.py:13:64 - error: Type "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to declared type "TTLCache[str, dict[str, Any], float]"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "TTLCache[str, dict[str, Any], float]"
+       Type parameter "_KT@TTLCache" is invariant, but "_KT2@__init__" is not the same as "str"
+       Type parameter "_VT@TTLCache" is invariant, but "_VT2@__init__" is not the same as "dict[str, Any]" (reportAssignmentType)
+   .../projects/prefect/src/prefect/server/database/query_components.py:68:66 - error: Type "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to declared type "Cache[str, dict[str, Any]]"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "Cache[str, dict[str, Any]]"
+       Type parameter "_KT@Cache" is invariant, but "_KT2@__init__" is not the same as "str"
+       Type parameter "_VT@Cache" is invariant, but "_VT2@__init__" is not the same as "dict[str, Any]" (reportAssignmentType)
+   .../projects/prefect/src/prefect/server/events/actions.py:1810:47 - error: Type "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to declared type "MutableMapping[UUID, bool]"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "MutableMapping[UUID, bool]"
+       Type parameter "_KT@MutableMapping" is invariant, but "_KT2@__init__" is not the same as "UUID"
+       Type parameter "_VT@MutableMapping" is invariant, but "_VT2@__init__" is not the same as "bool" (reportAssignmentType)
+   .../projects/prefect/src/prefect/server/events/ordering/db.py:36:62 - error: Type "defaultdict[Unknown, TTLCache[_KT2@__init__, _VT2@__init__, float]]" is not assignable to declared type "Mapping[str, MutableMapping[UUID, bool]]"
+     "defaultdict[Unknown, TTLCache[_KT2@__init__, _VT2@__init__, float]]" is not assignable to "Mapping[str, MutableMapping[UUID, bool]]"
+       Type parameter "_VT_co@Mapping" is covariant, but "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not a subtype of "MutableMapping[UUID, bool]"
+         "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "MutableMapping[UUID, bool]"
+           Type parameter "_KT@MutableMapping" is invariant, but "_KT2@__init__" is not the same as "UUID"
+           Type parameter "_VT@MutableMapping" is invariant, but "_VT2@__init__" is not the same as "bool" (reportAssignmentType)
+   .../projects/prefect/src/prefect/server/events/ordering/memory.py:57:51 - error: Cannot assign to attribute "_seen_events" for class "CausalOrdering*"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "TTLCache[UUID, bool, float]"
+       Type parameter "_KT@TTLCache" is invariant, but "_KT2@__init__" is not the same as "UUID"
+       Type parameter "_VT@TTLCache" is invariant, but "_VT2@__init__" is not the same as "bool" (reportAttributeAccessIssue)
+   .../projects/prefect/src/prefect/server/models/events.py:36:69 - error: Type "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to declared type "MutableMapping[UUID, ResourceData]"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "MutableMapping[UUID, ResourceData]"
+       Type parameter "_KT@MutableMapping" is invariant, but "_KT2@__init__" is not the same as "UUID"
+       Type parameter "_VT@MutableMapping" is invariant, but "_VT2@__init__" is not the same as "ResourceData" (reportAssignmentType)
+   .../projects/prefect/src/prefect/server/utilities/messaging/memory.py:257:58 - error: Type "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to declared type "MutableMapping[str, bool]"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "MutableMapping[str, bool]"
+       Type parameter "_KT@MutableMapping" is invariant, but "_KT2@__init__" is not the same as "str"
+       Type parameter "_VT@MutableMapping" is invariant, but "_VT2@__init__" is not the same as "bool" (reportAssignmentType)
+   .../projects/prefect/src/prefect/settings/sources.py:27:46 - error: Type "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to declared type "TTLCache[str, dict[str, Any], float]"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "TTLCache[str, dict[str, Any], float]"
+       Type parameter "_KT@TTLCache" is invariant, but "_KT2@__init__" is not the same as "str"
+       Type parameter "_VT@TTLCache" is invariant, but "_VT2@__init__" is not the same as "dict[str, Any]" (reportAssignmentType)
+   .../projects/prefect/src/prefect/task_runs.py:81:13 - error: Cannot assign to attribute "_observed_completed_task_runs" for class "TaskRunWaiter*"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "TTLCache[UUID, State[Any] | None, float]"
+       Type parameter "_KT@TTLCache" is invariant, but "_KT2@__init__" is not the same as "UUID"
+       Type parameter "_VT@TTLCache" is invariant, but "_VT2@__init__" is not the same as "State[Any] | None" (reportAttributeAccessIssue)
- 6243 errors, 184 warnings, 0 informations
+ 6259 errors, 184 warnings, 0 informations

streamlit (https://github.com/streamlit/streamlit)
+   .../projects/streamlit/lib/streamlit/runtime/memory_session_storage.py:63:57 - error: Cannot assign to attribute "_cache" for class "MemorySessionStorage*"
+     "TTLCache[_KT2@__init__, _VT2@__init__, float]" is not assignable to "MutableMapping[str, SessionInfo]"
+       Type parameter "_KT@MutableMapping" is invariant, but "_KT2@__init__" is not the same as "str"
+       Type parameter "_VT@MutableMapping" is invariant, but "_VT2@__init__" is not the same as "SessionInfo" (reportAttributeAccessIssue)
- 5344 errors, 107 warnings, 0 informations
+ 5345 errors, 107 warnings, 0 informations

dd-trace-py (https://github.com/DataDog/dd-trace-py)
-   .../projects/dd-trace-py/ddtrace/internal/ipc.py:59:17 - error: Type "Overload[(file: FileDescriptorOrPath, mode: OpenTextMode = "r", buffering: int = -1, encoding: str | None = None, errors: str | None = None, newline: str | None = None, closefd: bool = True, opener: _Opener | None = None) -> TextIOWrapper[_WrappedBuffer], (file: FileDescriptorOrPath, mode: OpenBinaryMode, buffering: Literal[0], encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: _Opener | None = None) -> FileIO, (file: FileDescriptorOrPath, mode: OpenBinaryModeUpdating, buffering: Literal[-1, 1] = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: _Opener | None = None) -> BufferedRandom, (file: FileDescriptorOrPath, mode: OpenBinaryModeWriting, buffering: Literal[-1, 1] = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: _Opener | None = None) -> BufferedWriter, (file: FileDescriptorOrPath, mode: OpenBinaryModeReading, buffering: Literal[-1, 1] = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: _Opener | None = None) -> BufferedReader[_BufferedReaderStream], (file: FileDescriptorOrPath, mode: OpenBinaryMode, buffering: int = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: _Opener | None = None) -> BinaryIO, (file: FileDescriptorOrPath, mode: str, buffering: int = -1, encoding: str | None = None, errors: str | None = None, newline: str | None = None, closefd: bool = True, opener: _Opener | None = None) -> IO[Any]]" is not assignable to declared type "(path: Unknown, mode: Unknown) -> BufferedRandom"
+   .../projects/dd-trace-py/ddtrace/internal/ipc.py:59:17 - error: Type "Overload[(file: FileDescriptorOrPath, mode: OpenTextMode = "r", buffering: int = -1, encoding: str | None = None, errors: str | None = None, newline: str | None = None, closefd: bool = True, opener: _Opener | None = None) -> TextIOWrapper[_WrappedBuffer], (file: FileDescriptorOrPath, mode: OpenBinaryMode, buffering: Literal[0], encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: _Opener | None = None) -> FileIO, (file: FileDescriptorOrPath, mode: OpenBinaryModeUpdating, buffering: Literal[-1, 1] = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: _Opener | None = None) -> BufferedRandom, (file: FileDescriptorOrPath, mode: OpenBinaryModeWriting, buffering: Literal[-1, 1] = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: _Opener | None = None) -> BufferedWriter[_BufferedWriterStream], (file: FileDescriptorOrPath, mode: OpenBinaryModeReading, buffering: Literal[-1, 1] = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: _Opener | None = None) -> BufferedReader[_BufferedReaderStream], (file: FileDescriptorOrPath, mode: OpenBinaryMode, buffering: int = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: _Opener | None = None) -> BinaryIO, (file: FileDescriptorOrPath, mode: str, buffering: int = -1, encoding: str | None = None, errors: str | None = None, newline: str | None = None, closefd: bool = True, opener: _Opener | None = None) -> IO[Any]]" is not assignable to declared type "(path: Unknown, mode: Unknown) -> BufferedRandom"

numpy-stl (https://github.com/WoLpH/numpy-stl)
+ .../projects/numpy-stl/stl/stl.py
+   .../projects/numpy-stl/stl/stl.py:430:30 - error: Argument type is partially unknown
+     Argument corresponds to parameter "fid" in function "tofile"
+     Argument type is "BufferedWriter[Unknown]" (reportUnknownArgumentType)
- 1 error, 0 warnings, 0 informations
+ 2 errors, 0 warnings, 0 informations

paasta (https://github.com/yelp/paasta)
-   .../projects/paasta/paasta_tools/utils.py:2861:37 - error: Argument of type "bytes" cannot be assigned to parameter "s" of type "str" in function "write"
-     "bytes" is not assignable to "str" (reportArgumentType)
-   .../projects/paasta/paasta_tools/utils.py:2875:30 - error: Cannot access attribute "decode" for class "str"
-     Attribute "decode" is unknown (reportAttributeAccessIssue)
- 1187 errors, 114 warnings, 0 informations
+ 1185 errors, 114 warnings, 0 informations

werkzeug (https://github.com/pallets/werkzeug)
-   .../projects/werkzeug/src/werkzeug/datastructures/file_storage.py:119:38 - error: Argument of type "BufferedWriter | Unknown | PathLike[str] | IO[bytes]" cannot be assigned to parameter "fdst" of type "SupportsWrite[AnyStr@copyfileobj]" in function "copyfileobj"
+   .../projects/werkzeug/src/werkzeug/datastructures/file_storage.py:119:38 - error: Argument of type "BufferedWriter[_BufferedWriterStream] | Unknown | PathLike[str] | IO[bytes]" cannot be assigned to parameter "fdst" of type "SupportsWrite[AnyStr@copyfileobj]" in function "copyfileobj"
-     Type "BufferedWriter | Unknown | PathLike[str] | IO[bytes]" is not assignable to type "SupportsWrite[bytes]"
+     Type "BufferedWriter[_BufferedWriterStream] | Unknown | PathLike[str] | IO[bytes]" is not assignable to type "SupportsWrite[bytes]"

spark (https://github.com/apache/spark)
-   .../projects/spark/python/pyspark/sql/streaming/proto/StateMessage_pb2.py:53:16 - error: Cannot assign to attribute "_loaded_options" for class "FileDescriptor"
-     Attribute "_loaded_options" is unknown (reportAttributeAccessIssue)
- 31767 errors, 933 warnings, 0 informations
+ 31766 errors, 933 warnings, 0 informations

optuna (https://github.com/optuna/optuna)
-   .../projects/optuna/optuna/storages/_grpc/auto_generated/api_pb2.py:33:14 - error: Cannot assign to attribute "_loaded_options" for class "FileDescriptor"
-     Attribute "_loaded_options" is unknown (reportAttributeAccessIssue)
- 842 errors, 29 warnings, 0 informations
+ 841 errors, 29 warnings, 0 informations

pwndbg (https://github.com/pwndbg/pwndbg)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:100:11 - error: Cannot access attribute "__ctype_le__" for class "type[c_char]"
-     Attribute "__ctype_le__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:100:11 - error: Cannot access attribute "__ctype_le__" for class "c_int8"
-     Attribute "__ctype_le__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:100:11 - error: Cannot access attribute "__ctype_le__" for class "type[c_int16]"
-     Attribute "__ctype_le__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:100:11 - error: Cannot access attribute "__ctype_le__" for class "type[c_int32]"
-     Attribute "__ctype_le__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:100:11 - error: Cannot access attribute "__ctype_le__" for class "type[c_int64]"
-     Attribute "__ctype_le__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:100:11 - error: Cannot access attribute "__ctype_le__" for class "c_uint8"
-     Attribute "__ctype_le__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:100:11 - error: Cannot access attribute "__ctype_le__" for class "type[c_uint16]"
-     Attribute "__ctype_le__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:100:11 - error: Cannot access attribute "__ctype_le__" for class "type[c_uint32]"
-     Attribute "__ctype_le__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:100:11 - error: Cannot access attribute "__ctype_le__" for class "type[c_uint64]"
-     Attribute "__ctype_le__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:104:11 - error: Cannot access attribute "__ctype_be__" for class "type[c_char]"
-     Attribute "__ctype_be__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:104:11 - error: Cannot access attribute "__ctype_be__" for class "c_int8"
-     Attribute "__ctype_be__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:104:11 - error: Cannot access attribute "__ctype_be__" for class "type[c_int16]"
-     Attribute "__ctype_be__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:104:11 - error: Cannot access attribute "__ctype_be__" for class "type[c_int32]"
-     Attribute "__ctype_be__" is unknown (reportAttributeAccessIssue)
-   .../projects/pwndbg/pwndbg/aglib/heap/structs.py:104:11 - error: Cannot access attribute "__ctype_be__" for class "type[c_int64]"
-     Attribute "__ctype_be__" is unknown (reportAttributeAccessIssue)

... (truncated 26 lines) ...```

@bschnurr bschnurr merged commit 505a9bc into microsoft:main May 5, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants