-
-
Notifications
You must be signed in to change notification settings - Fork 209
Go back to LBYL programming style (instead of EAFP) and several mypy
fixes in fem.petsc
and la.petsc
#3790
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
Co-authored-by: Paul T. Kühner <[email protected]>
I think there are quite a few more cases of the EAFP paradigm. In If not addressed here, we should keep the issue open. |
I edited the PR description removing "Fixes". |
fem.petsc
and la.petsc
mypy
fixes in fem.petsc
and la.petsc
ea8fafb
to
acf502e
Compare
I now removed I also moved from I suggest giving the review of this PR a priority higher than #3787 #3794 . After this one is in, the other two PRs will finish up on fixing #3738, which was the original goal of this PR. |
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.
We should maybe aim to activate warn_unused_ignores
in the mypy settings to get notified when all these PETSc ignores are no longer necessary.
Agreed, but this will not happen in this PR. |
Co-authored-by: Paul T. Kühner <[email protected]>
Principle agreed upon in previous discussions. Queueing this to merge to unblock other PRs (e.g. #3794). |
fem.petsc
andla.petsc
Iterable
withSequence
in all public function signatures infem.petsc
andla.petsc
. See Go back to LBYL programming style (instead of EAFP) and severalmypy
fixes infem.petsc
andla.petsc
#3790 (comment) .# mypy: ignore-errors
infem.petsc
: this has uncovered several typing errors that are fixed here.(replaces #3789 which was not branched off of
main
)