-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typechecking fails #1
Comments
Thanks for your feedback, I think the internal type errors of apix are fixable. But I'm not sure that the api definition like By the way, It's the first time I heard of |
I'm affraid this can't pass type check without special support from typechecker -
I see that |
In fact I found a way to let class Query:
pass
def foo(bar: Query[int, str](...) = 'bar'):
...
# translated to
def foo(bar: _GenericAlias['Query', (int, str)] = 'bar'):
... Which means, |
I like the second solution, it's great that you figured out how to provide required information with types without compromising their original purpose. This approach may be not the most obvious at first glance but seems to be clear and I'd like to see if it will work. |
btw - I see that uplink has a long standing issue request to support / leverage Pydantic. |
@Imaclean74 I found that typical is a better choice, |
I like the design of I think you need to add |
Hi! I saw your package on Reddit, was interested, tried to check it and found that it does not pass type checking with
mypy
:py.typed
is missing:py.typed
manually to mark thatapix
is typed module, example from README doesn't pass type check:apix
itself fails to pass type check:3a. It's better to check in strict mode and then
mypy
gives 160 type errors forapix
Overall I like an idea of typed http client, also I see similarities with
uplink
's approach which I personally like too, but I have to say thatapix
is far from being typed - type annotations without type checking are not very useful.The text was updated successfully, but these errors were encountered: