-
Notifications
You must be signed in to change notification settings - Fork 250
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
Standardize import style #478
Comments
We might need to change the import path due to the refactoring work in #445 (potential breaking changes). |
I feel standardizing imports as per pep8 standards would be better. |
@kshithijiyer would you explain why you would prefer pep8? |
Pep8 standard in general improves code readability. Apart from that, it has now become the standard for python code. I would say that the standard mentioned in the previous comments is good but creates an issue when we actually import everything into the namespace. For example, if you wish to use |
We already follow PEP 8, this ticket is about consistently importing either classes or modules.
Whether you import the module or individual functions/classes the import machinery creates the module object and executes the code, there's no reason to prefer importing individual functions/classes except personal style.
|
hey @c24t @kshithijiyer @reyang can I work on this? |
@dineshkrishnareddy definitely! FYI: |
The google python style guide recommends against importing classes. This makes it clear which namespace defines each class, but is cumbersome and leads to ugly workarounds for common namespace names (e.g.
... import view as view_module
).Most modules have a consistent internal import style, but there's no consistent style across the library. We should decide whether to follow the style guide everywhere or break from it everywhere.
The text was updated successfully, but these errors were encountered: