-
Notifications
You must be signed in to change notification settings - Fork 207
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
Refactor static typing of the picamera2
module
#1234
Conversation
@davidplowman it'll be easier to review commit by commit |
Hi again, great - thanks for doing more on this. I can look at this next week (bit late in the day right now!), let me know how you'd like to proceed. Is it worth running the CI tests already? |
yes
no issues |
e4ddde0
to
587e289
Compare
you can run tests now, I used 3.12 syntax earlier 😅 it should be now 3.9+ compatible |
Hi, I think I've enabled the checks to run automatically for you now, hopefully that will make things a bit easier. |
8dce134
to
d1588e7
Compare
…ons; resolve remaining type checker errors
Hi, and thanks for doing all this. Is there anything more you think we might be able to turn on in the CI tests? Having got these improvements, I'm keen for us to hang on to them and not let in commits that might take things backwards again. |
as of this PR, I've eliminated* all type checker errors that were reported by pyright for the as for protecting the overloads and better return types that I've added, I don't see an elegant way to do this, but to add a test file and statically type it with the desired/expected type, and run pyright on it? something like: we expect the return type to be a PIL image so we type it as such. if in future, somebody changes the overloads or the return type of *could you check locally and confirm. I'm on a mac so I don't have access to |
functions passed to as far as I'm reading the codebase, the result gets discarded when done is |
Hi, sorry I forgot to answer that. Yes, I think you're right, the result doesn't mean anything when done is Anyway, I've merged this one now, thanks for all the work you've put into this! |
dispatch_functions
(as they can return two kind of types)follow-up of #1179
Before:

After:

(committed this in December, fell ill, forgot to put in a PR since haha)
looks like there will be merge conflicts with #1205, so creating a draft PR for nowrebased ontoHEAD
.