-
Notifications
You must be signed in to change notification settings - Fork 176
Remove star imports from __init__.py
#4722
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
base: main
Are you sure you want to change the base?
Conversation
connorjward
left a comment
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 great! Thanks for taking this on.
It seems like a fair number of tests are still failing. Also when we merge this we should announce it.
| # from firedrake._deprecation import output | ||
| # sys.modules["firedrake.output"] = output | ||
| from firedrake.output import * | ||
| from firedrake.output import * # noqa: F401 |
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.
Ditto
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.
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.
Yeah good idea
| import sys | ||
| sys.modules["firedrake.plot"] = plot | ||
| from firedrake.plot import * | ||
| from firedrake.plot import * # noqa: F401 |
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.
Ditto
| real | ||
| ) | ||
| from firedrake.cython import dmcommon | ||
| from firedrake import mesh |
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.
Oh amazing. I always hated this.
Explicit imports in
firedrake/__init__.py. Fixes namespace leakage problem #4696.Things that are no longer in the firedrake namespace (not exhaustive):
npstop_annotatinguflPETSc