From 965c4d8d6d67c3ca0c7fa717f7a232de0105df38 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Sat, 14 Nov 2026 20:21:19 -0800 Subject: [PATCH] Make operator protocol operands positional-only --- stdlib/_operator.pyi | 66 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/stdlib/_operator.pyi b/stdlib/_operator.pyi index 541d150fe937..953e05813da6 100644 --- a/stdlib/_operator.pyi +++ b/stdlib/_operator.pyi @@ -43,135 +43,135 @@ class _SupportsPos(Protocol[_T_co]): @type_check_only class _SupportsAnd(Protocol[_T_contra, _T_co]): - def __and__(self, other: _T_contra) -> _T_co: ... + def __and__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsRAnd(Protocol[_T_contra, _T_co]): - def __rand__(self, other: _T_contra) -> _T_co: ... + def __rand__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsLShift(Protocol[_T_contra, _T_co]): - def __lshift__(self, other: _T_contra) -> _T_co: ... + def __lshift__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsRLShift(Protocol[_T_contra, _T_co]): - def __rlshift__(self, other: _T_contra) -> _T_co: ... + def __rlshift__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsRShift(Protocol[_T_contra, _T_co]): - def __rshift__(self, other: _T_contra) -> _T_co: ... + def __rshift__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsRRShift(Protocol[_T_contra, _T_co]): - def __rrshift__(self, other: _T_contra) -> _T_co: ... + def __rrshift__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsTrueDiv(Protocol[_T_contra, _T_co]): - def __truediv__(self, other: _T_contra) -> _T_co: ... + def __truediv__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsRTrueDiv(Protocol[_T_contra, _T_co]): - def __rtruediv__(self, other: _T_contra) -> _T_co: ... + def __rtruediv__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsFloorDiv(Protocol[_T_contra, _T_co]): - def __floordiv__(self, other: _T_contra) -> _T_co: ... + def __floordiv__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsRFloorDiv(Protocol[_T_contra, _T_co]): - def __rfloordiv__(self, other: _T_contra) -> _T_co: ... + def __rfloordiv__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsMod(Protocol[_T_contra, _T_co]): - def __mod__(self, other: _T_contra) -> _T_co: ... + def __mod__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsRMod(Protocol[_T_contra, _T_co]): - def __rmod__(self, other: _T_contra) -> _T_co: ... + def __rmod__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsMatMul(Protocol[_T_contra, _T_co]): - def __matmul__(self, other: _T_contra) -> _T_co: ... + def __matmul__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsRMatMul(Protocol[_T_contra, _T_co]): - def __rmatmul__(self, other: _T_contra) -> _T_co: ... + def __rmatmul__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsOr(Protocol[_T_contra, _T_co]): - def __or__(self, other: _T_contra) -> _T_co: ... + def __or__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsROr(Protocol[_T_contra, _T_co]): - def __ror__(self, other: _T_contra) -> _T_co: ... + def __ror__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsPow(Protocol[_T_contra, _T_co]): - def __pow__(self, other: _T_contra) -> _T_co: ... + def __pow__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsRPow(Protocol[_T_contra, _T_co]): - def __rpow__(self, other: _T_contra) -> _T_co: ... + def __rpow__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsXOr(Protocol[_T_contra, _T_co]): - def __xor__(self, other: _T_contra) -> _T_co: ... + def __xor__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsRXOr(Protocol[_T_contra, _T_co]): - def __rxor__(self, other: _T_contra) -> _T_co: ... + def __rxor__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIAdd(Protocol[_T_contra, _T_co]): - def __iadd__(self, other: _T_contra) -> _T_co: ... + def __iadd__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIAnd(Protocol[_T_contra, _T_co]): - def __iand__(self, other: _T_contra) -> _T_co: ... + def __iand__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsILShift(Protocol[_T_contra, _T_co]): - def __ilshift__(self, other: _T_contra) -> _T_co: ... + def __ilshift__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIMod(Protocol[_T_contra, _T_co]): - def __imod__(self, other: _T_contra) -> _T_co: ... + def __imod__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIMul(Protocol[_T_contra, _T_co]): - def __imul__(self, other: _T_contra) -> _T_co: ... + def __imul__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIMatMul(Protocol[_T_contra, _T_co]): - def __imatmul__(self, other: _T_contra) -> _T_co: ... + def __imatmul__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIOr(Protocol[_T_contra, _T_co]): - def __ior__(self, other: _T_contra) -> _T_co: ... + def __ior__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIPow(Protocol[_T_contra, _T_co]): - def __ipow__(self, other: _T_contra) -> _T_co: ... + def __ipow__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIRShift(Protocol[_T_contra, _T_co]): - def __irshift__(self, other: _T_contra) -> _T_co: ... + def __irshift__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsISub(Protocol[_T_contra, _T_co]): - def __isub__(self, other: _T_contra) -> _T_co: ... + def __isub__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsITrueDiv(Protocol[_T_contra, _T_co]): - def __itruediv__(self, other: _T_contra) -> _T_co: ... + def __itruediv__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIXOr(Protocol[_T_contra, _T_co]): - def __ixor__(self, other: _T_contra) -> _T_co: ... + def __ixor__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIFloorDiv(Protocol[_T_contra, _T_co]): - def __ifloordiv__(self, other: _T_contra) -> _T_co: ... + def __ifloordiv__(self, other: _T_contra, /) -> _T_co: ... @type_check_only class _SupportsIConcat(Protocol[_T_contra, _T_co]):