-
Notifications
You must be signed in to change notification settings - Fork 12
adding type information #27
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
Conversation
Here's the relevant PEP, for reference: https://peps.python.org/pep-3102/#:~:text=Keyword%2Donly%20arguments%20are%20not,therefore%20'required%20keyword'%20arguments. |
It sounds like if it were |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! A few questions and suggestions, but otherwise looks good!
I'm not sure if it does. It would seem tricky though because it can represent multiple different arguments, so no single type could really describe it in all cases. |
I think using only |
Interesting, I never knew about that usage of the Thank you for looking this over and for explanation about the different Buffer protocols. I think I'm starting to get a better understanding of when it's appropriate to use which one. I think I've got all of the requested changes in the latest commit. If you have another chance to take a look @tekktrik let me know if anything else is needed. |
My pleasure! I think that's everything! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Updating https://github.com/adafruit/Adafruit_CircuitPython_VC0706 to 5.0.1 from 5.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_VC0706#27 from FoamyGuy/type_info
resolves #21.
The main thing I am somewhat uncertain of is the
*
arg in the constructor here:https://github.com/FoamyGuy/Adafruit_CircuitPython_VC0706/blob/d56a319b59a5f211617c90bb9963d03b405cc879/adafruit_vc0706.py#L93
I tried
Any
type but that did not seem to work. I'm not sure what the proper way to type this wildcard argument is. Perhaps leaving it untyped is standard practice? If anyone knows about this, or knows of an example where this is done in another library let me know.