Skip to content
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

In resolve_qualified_import_name, prefer direct vs. attribute names #10479

Open
charliermarsh opened this issue Mar 19, 2024 · 1 comment
Open
Labels
internal An internal refactor or improvement

Comments

@charliermarsh
Copy link
Member

If both import logging and from logging import error are in scope, and the user asks for the symbol logging.error, I think it makes sense to prefer "error" over "logging.error".

@dhruvmanila
Copy link
Member

Yeah, I agree. If the symbol is already imported then we should use it directly instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement
Projects
None yet
Development

No branches or pull requests

2 participants