orcharddweller

Results 14 comments of orcharddweller

> Also, the update method should also be updated with the changed parameter name. Fixed, also added setter for `.type_`.

> It is possible to provide backwards compatibility by not making type and value be required positional arguments, but instead use *args and **kwargs and have the actual supported signature(s)...

> I was thinking we'll just add a new param, type_=None, and change inst.type = type to inst.type = type_ if type_ is not None else type That would make...

Hey, I've figured out that the easiest way to use `*args` and `**kwargs` with `@overload`, was to create methods for the old and new signatures and call them from the...

Also, I'm pretty sure it would be nice to add proper typings to `Token.__new__` and to fix the typings for `Token` (most of the stuff there should be `Optional`), but...

> Why did you write > > def __new__(cls, *args, **kwargs): > if "type_" in kwargs: > return cls._deprecated_new(*args, **kwargs) > > return cls._future_new(*args, **kwargs) > Instead of just -...

> That's true! We should fix that. Fixed types and added typings to `Token.__new__`.

> > errors will be more readable: > > That's a bit of a nitpick. I can easily add this, and get an even better error - > > ```...

> I'm not very familiar with the match syntax. Would it not work to use positional arguments? It would require adding `__match_args__`. > * Add `__match_args__ = ('type', 'value')` to...

Oh, that makes sense, I'll try to add a PR with those changes this week.