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

Two different fixers should not handle same imports #7674

Open
mvorisek opened this issue Jan 4, 2024 · 3 comments
Open

Two different fixers should not handle same imports #7674

mvorisek opened this issue Jan 4, 2024 · 3 comments
Labels
kind/feature request topic/fqcn Fully Qualified Class Name usage and conversions

Comments

@mvorisek
Copy link
Contributor

mvorisek commented Jan 4, 2024

Feature request

It seems at least new import is now handled by:

I would expect this to be deduplicated, global_namespace_import should be probably deprecated and removed later.

This is maintanance issue only, fully_qualified_strict_types has higher priority, thus all work is done before global_namespace_import is run and I do not observe any related functional bug.

@Wirone
Copy link
Member

Wirone commented Jan 4, 2024

Importing symbols from global namespace is explicitly skipped in fully_qualified_strict_types, there is even test case for that. At this point these fixers are not colliding, but I agree these should be merged into one, under a more appropriate name 🙂.

@Wirone Wirone added this to the long-term-ideas milestone Jan 4, 2024
@Wirone Wirone added the topic/fqcn Fully Qualified Class Name usage and conversions label Jan 4, 2024
@mvorisek
Copy link
Contributor Author

mvorisek commented Jan 6, 2024

Let's add these two options to fully_qualified_strict_types:

@Wirone
Copy link
Member

Wirone commented Jan 6, 2024

I was thinking rather about the ability to define import_symbols both as bool (fully enabled / disabled) or an array with more specific options, where top-level true would act as true for all of the options. This way we could introduce fine-tuned options for importing classes/function/constants just like global_namespace_import has.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature request topic/fqcn Fully Qualified Class Name usage and conversions
Projects
None yet
Development

No branches or pull requests

2 participants