You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... which is a much nicer experience downstream as we don't need to narrow the return type somehow before we go on to use it.
LMK if this is something you'd be interested in a PR for.. there is potentially a lot of overloads required as all of the arguments can be specified either positionally or by kwarg and mypy requires an overload that covers any scenarios. E.g., here is the diff that I've got to produce the above:
Sounds good - might I suggest as per discussion on #2 that this current issue widens in scope to include all of the changes you feel are appropriate to get the package in good shape for mypy including incorporating it into CI
The function has a boolean flag argument that alters its output so we can use
@overload
to specify the relationship between args and output types.For example,
with 0.1.1 branch:
Using overloads, that can be:
... which is a much nicer experience downstream as we don't need to narrow the return type somehow before we go on to use it.
LMK if this is something you'd be interested in a PR for.. there is potentially a lot of overloads required as all of the arguments can be specified either positionally or by kwarg and mypy requires an overload that covers any scenarios. E.g., here is the diff that I've got to produce the above:
The number of overloads could be reduced by making the args other than
odds
keyword only, which would be an OK fit IMO:The text was updated successfully, but these errors were encountered: