Closed
Description
opened on Jan 4, 2024
λ cat hm.pyi
from typing import Generic, TypeVar
_KT = TypeVar("_KT") # Key type.
_VT = TypeVar("_VT") # Value type.
class M1(Generic[_KT, _VT]):
def pop(self, __key: _KT, default: _VT) -> _VT: ...
class M2(Generic[_KT, _VT]):
def pop(self, key: _KT, /, default: _VT) -> _VT: ...
λ flake8 hm.pyi
hm.pyi:11:32: Y019 Use "_typeshed.Self" instead of "_VT", e.g. "def pop(self, key: _KT, /, default: Self) -> Self: ..."
Looks like logic for determining first parameter isn't correct
Activity