Skip to content
This repository was archived by the owner on Dec 8, 2023. It is now read-only.

fix: multiple imports with ensure_included()#25

Merged
morgante merged 2 commits intogetgrit:mainfrom
vlopezferrando:ensure-imported-many-times
Sep 19, 2023
Merged

fix: multiple imports with ensure_included()#25
morgante merged 2 commits intogetgrit:mainfrom
vlopezferrando:ensure-imported-many-times

Conversation

@vlopezferrando
Copy link
Contributor

@vlopezferrando vlopezferrando commented Sep 19, 2023

Fixes #24

Also, I have observed that ensure_included() doesn't match when there are other top-level imports (see this studio as an example).

However, there is one issue still pending: if there is an import like from math import log, and then you ensure the import of math, the pattern does not match. This has been reported as a separate issue: #26.

@vlopezferrando vlopezferrando changed the title Check that $name is not already on $GLOBAL_BARE_IMPORTS before appending Check that $name is not already on $GLOBAL_BARE_IMPORTS before appending Sep 19, 2023
@vlopezferrando vlopezferrando changed the title Check that $name is not already on $GLOBAL_BARE_IMPORTS before appending fix: multiple imports with ensure_included() Sep 19, 2023
@morgante morgante merged commit e50be5f into getgrit:main Sep 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ensure_imported adds same import multiple times

2 participants