Sebastian Rittau

Results 518 comments of Sebastian Rittau

See #11422 for the type var generics feature tracker.

I think there is consensus that `__all__` should be included iff it's included in the implementation. There is also already a recommendation to do so in the type stubs style...

I split the kwargs case into #1524.

> So a relatively straightforward implementation would be to do option 1 (I'm confused why @srittau says it won't work in variable annotations), but we're adding two unnecessary lines -...

Thanks everyone, and especially @jakkdl for making this happen!

Since it's been a while since the last comment on this, I'd like to voice my support for this. I fairly often have constructs like this: ```jsx ``` Reducing this...

The reason the tests fail is that `date.__sub__` has an overload `def __sub__(self, __value: Self) -> timedelta: ...`, which of course matches the tested line and therefore returns a timedelta....

C implementation here: https://github.com/python/cpython/blob/015b97d19a24a169cc3c0939119e1228791e4253/Modules/_datetimemodule.c#L3220-L3245

Please ignore my comments about `date.__sub__`. The stubs, the C, and Python implementation all override it in `datetime.__sub__`. Our stubs shouldn't match: ```python class datetime(date): # ... @overload # type:...

I'm not sure what's going on. Maybe @erictraut has an idea as it seems that only pyright fails while mypy accepts the tests.