Description
I'm trying to type an api and have used the below definition:
class HasRichRepr(Protocol):
def __rich_repr__(self) -> rich.repr.Result:
...which appears to conflict with the type definitionon the struct:
Return type "Iterable[Any | tuple[Any] | tuple[str, Any] | tuple[str, Any, Any]]" of "__rich_repr__" incompatible with return type "Iterable[tuple[str, Any]]" in supertype "Struct" [override]
https://github.com/jcrist/msgspec/blob/256d84a2f233ee741a2c2e4d67633b13ffcd37a4/msgspec/__init__.pyi#L71
It would probably be good to align the type with the definition upstream?
def __rich_repr__(self) -> Iterable[Any | tuple[Any] | tuple[str, Any] | tuple[str, Any, Any]]
Description
I'm trying to type an api and have used the below definition:
...which appears to conflict with the type definitionon the struct:
https://github.com/jcrist/msgspec/blob/256d84a2f233ee741a2c2e4d67633b13ffcd37a4/msgspec/__init__.pyi#L71
It would probably be good to align the type with the definition upstream?