-
Notifications
You must be signed in to change notification settings - Fork 75
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
Replace import all syntax with explicit import #2003
base: master
Are you sure you want to change the base?
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.
LGTM!
"# \n" + | ||
"# class ProcessTupleOperator(UDFOperatorV2):\n" + | ||
"# \n" + |
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.
Here I am adding a new line to fix the warning of single blank line between imports and class definitions.
After a discussion with @aglinxinyuan, an issue is that |
discuss this later. |
It is not recommended to use
import *
statements per PEP 8. It was generally a bad idea to expose the namespace with a wildcard. In our case, pyflakes complains aboutfrom pytexera import *
and raises a warning in the UI.This PR uses
import pytexera as ptx
and the explicitptx.Tuple
,ptx.UDFOperatorV2
variables which is considered a better practice. This change is backward compatible so existing UDFs will not be affected.