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
I saw mapbox/mercantile#140 and since @sgillies was receptive to the idea of adding type hints, I thought I'd also start a discussion here about adding type hints 🙂 .
Affine is a relatively small and self-contained library, so it could be a good library in the ecosystem to start with. I'd be happy to put up a PR if there's interest.
One possible hiccup that I found in the creation of external type stubs for affine is that mypy complained about violating the Liskov substitution principle. Specifically I wasn't able to type __mul__ to take an Affine object as input and output, because that's an incompatible override of the NamedTuple's __mul__ typing.
The text was updated successfully, but these errors were encountered:
Can the typing complaint not be ignored? I love how stable Affine is at the moment and would love to focus on other things and not make any new releases of it.
👋
I saw mapbox/mercantile#140 and since @sgillies was receptive to the idea of adding type hints, I thought I'd also start a discussion here about adding type hints 🙂 .
Affine is a relatively small and self-contained library, so it could be a good library in the ecosystem to start with. I'd be happy to put up a PR if there's interest.
One possible hiccup that I found in the creation of external type stubs for affine is that mypy complained about violating the Liskov substitution principle. Specifically I wasn't able to type
__mul__
to take anAffine
object as input and output, because that's an incompatible override of the NamedTuple's__mul__
typing.The text was updated successfully, but these errors were encountered: