Sebastian Rittau

Results 518 comments of Sebastian Rittau

Good point, I misunderstood my own proposal. :)

This is essentially what `Any` is: a marker that the type can't be represented with the current type system. Your example above could be written as: `JsonType = Union[List[Any], Dict[str,...

I still fail to see the difference between these two: ```python JsonType = LooseType(Union[List[..,], Dict[...]]) JsonType = Union[List[Any], Dict[Any, Any]] ``` How would a type checker check the first type...

I have a similar use case with [Ariadne middleware](https://ariadnegraphql.org/docs/middleware) functions, but with `kwargs`. In Ariadne, a "resolver" function takes two positional arguments and a varying number of keyword arguments that...

Thanks, I fixed the example. I agree that this is not high priority.

We should include a section about I/O types: * Use protocols if possible for argument types. * Use concrete types for return types. Ideally, these derive from `typing.IO`. * Use...

Another best practice: Use `from __future__ import annotations`. (Which of course @hmc-cs-mdrissi already mentioned and I overlooked.)

Maybe a good way to go about this is to start replacing argument types in typeshed with custom protocols in the respective modules (marked private so they do not get...

As seen above I submitted a first pull request implementing my last suggestion. Maybe it would be a good idea to mark those somehow, for example with a link to...