How to make mypy like my protocols that work at runtime with runtime_checkable
How to make mypy like my protocols that work at runtime with runtime_checkable Question: I defined a couple of protocols like so: import json from typing import Any, Protocol, TypeVar, runtime_checkable T_co = TypeVar(‘T_co’, covariant=True) T = TypeVar(‘T’) @runtime_checkable class SupportsRead(Protocol[T_co]): def read(self, __length: int = …) -> T_co: … @runtime_checkable class SupportsWrite(Protocol[T_co]): def write(self, …