-
Notifications
You must be signed in to change notification settings - Fork 6
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
Renaming the project to be boto3-stubs for MyPy compatibility. #9
Conversation
I really appreciate this project and I look forward to consideration on this pull request. |
Related to #6 |
Wow, thanks for bringing this to my attention. I wasn't aware of this PEP. It pretty much changes the game. I'm thinking that we could just check in a new custom build with the package name as boto3_type_annotations/configs/boto3-stubs.yaml services: all
with_docs: false
with_clients: true
with_service_resources: true
with_paginators: true
with_waiters: true
package_name: boto3-stubs
module_name: boto3-stubs
version: 0.3.1
readme: "../README.md"
license: "../LICENSE" Then this repo would have It does looks like the Python foundation wants me to contact AWS first to see if they want to add it to
I'll go ahead and open an issue on I'm gonna try to work on this tonight. I'll tag ya'll in the commit so we can discuss. I say "try" because there's a hurricane heading straight for me right now and my power goes out when it drizzles. I should be good tonight, but might be without electricity this weekend. |
Made the issue on |
@cowboygneox just pulled down your fork and ran your example. Sorry for the language, but this is fucking slick, man. I like this workflow a lot better than the current one. Looks like I'll have to change the build scripts to include all of boto3's functions and sub packages. PyCharm's showing an error saying
|
@alliefitter I appreciate the compliment. This is why we open source our work so that we can all benefit from a combined effort. As for the PyCharm showing an error that If you'd like, I could make a scratch project that has this working so you can open it and see if it's environmental. |
@cowboygneox Thanks for his PR! I tried it out though and failed to produce a working SQS example. Consider this:
|
Following MyPy's requested format documented in PEP 561, I renamed the main module per the mandated naming scheme. When used with MyPy, this actually works quite well. However, I currently do have to ignore one directive that I can take a swing at implementing next:
import boto3 # type: ignore
Everything else works well. Example that works in MyPy:
I don't expect this kind of rename to be accepted as-is, but if I receive some notes on how to make this kind of change, please let me know and I will make the changes so this can get into the mainline.