-
Notifications
You must be signed in to change notification settings - Fork 10
Fix #18 #26
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
Fix #18 #26
Conversation
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.
Sorry, I reviewed this a while ago and I guess just never hit "Submit review"! Attached is some feedback!
tekktrik, a standard practice of mine is to explicitly provide class-level attributes above I use this practice as it is a typically required syntax of many languages. In python though, it makes life slightly easier for static checkers and users/contributors down the road; as well as maintaining consistency for those familiar with statically typed languages. Do you wish for me to also do that here? And, are you able to provide the type annotations for |
If it doesn't have any effect on And shoot, I went down the rabbit hole trying to figure it out, and I thiiink I did but didn't write it down 😭 Let me take another look. |
Excellent. I'm currently waiting to see how the interpreter handles this syntax. I'm curious if it tosses these type declarations out like comments and docstrings, or if they are kept in. If it's the latter, I'll leave it up to you if you want me to continue since it will use more space. |
Sounds good! I can compile a version without and see how |
Update - I have no idea what type it is haha. The furthest I got was a found one library that says it's |
Haha, no worries. If anything, we can just leave it at I've also added the annotations for the class-level attributes. Let me know what you find and I'll use the info going forward! |
Aha! Figured out where it came from! It honestly seems like a relic from when it was could be set publicly: So yeah, |
Great find! Thanks for looking! I'll update this PR on Monday. Have a good weekend! |
@tekktrik I believe this PR is ready to merge. Let me know if I missed anything and I'll update. |
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 work! A few followup comments and changes.
Hey! Just checking in on this to see how it's going? Anything I can help unblock? |
No, sorry. I just have not been able to find time to finish this off yet. I'll hopefully get to it sometime this week. |
@tekktrik I'll just do this now while I am thinking about this. The CI is failing because it cannot find Adding these here fixes the issue on my machine locally, but I do not know if this file is "controlled" per se like |
It's controlled, but since they're technically now dependencies, they should go in |
…and ``setup.py``
@tekktrik Everything should be ready if you want to do one final look-through. |
With the dependencies updated, do you still need to mock the imports for |
Docs fail to build locally for me without the mock imports |
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.
Found the issue - You'll need to move all of the non-sphinx
requirements out of docs/requirements.txt
and into requirements.txt
in order to remove all of the autodoc_mock_imports
, which you can comment out as #autodoc_mock_imports = []
I forked your branch and tested it with the CI so it seems to be a local problem. What Python version are you using? Do you have all of the necessary library already installed? These looks like an issue that would occur if one of your typing imports fails. |
Running I use Anaconda to separate my environments since I work on many different projects. However, VSCode would sometimes prepend my base environment to When I installed Sphinx to build the docs locally, the above issue must have occurred causing sphinx to be installed in my base environment. Subsequently, because I haven't encountered the above issue since the ticket was closed, so my apologies for causing so much headache without intending to. I thought that issue was done and over with, but unfortunately, it does not appear to be so. Anyways, installing |
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.
I sit on a throne of lies - you will need to autodoc_mock_import = ["rtc"]
since it's native to CircuitPython but not available on Blinka.
Awesome, thanks for all this! |
Updating https://github.com/adafruit/Adafruit_CircuitPython_AW9523 to 1.1.0 from 1.0.6: > Merge pull request adafruit/Adafruit_CircuitPython_AW9523#6 from rtyley/add-constant-current-range-selector Updating https://github.com/adafruit/Adafruit_CircuitPython_DPS310 to 2.1.5 from 2.1.4: > Merge pull request adafruit/Adafruit_CircuitPython_DPS310#24 from tekktrik/dev/fix-units Updating https://github.com/adafruit/Adafruit_CircuitPython_GC_IOT_Core to 3.2.3 from 3.2.2: > Merge pull request adafruit/Adafruit_CircuitPython_GC_IOT_Core#26 from JulianOrteil/type-annotations
Adds type annotations as requested in #18.
Unfortunately, I am unable to successfully determine some types and those have been denoted with a
# TODO
comment. Hopefully, someone else will be able to provide the missing types via a comment and we can finish them off. Until then, all other annotations can be reviewed at leisure.