Skip to content

fixed undefined variable children_hooks + imports cleanup#348

Merged
edschofield merged 2 commits intoPythonCharmers:masterfrom
omit66:bugfix-touch_import_top
Feb 21, 2024
Merged

fixed undefined variable children_hooks + imports cleanup#348
edschofield merged 2 commits intoPythonCharmers:masterfrom
omit66:bugfix-touch_import_top

Conversation

@omit66
Copy link
Contributor

@omit66 omit66 commented Jul 17, 2018

Bugfix in function touch_import_top

current behavior:
It is not possible to create an new import without using from package.
If the parameter package of the function touch_import_top is None, the variable children_hooks is undefined.

expected behavior:
Setting package to None should create an import-statement.

changes:
children_hooks is used anyway, it should not be defined within an if-else statement.
Moved the definition.

Removed some reimports.

@lisroach
Copy link

Pinging this, we are running into this issue and would love to see it fixed.

@edschofield edschofield merged commit 515f611 into PythonCharmers:master Feb 21, 2024
@edschofield
Copy link
Contributor

Thanks @omit66 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants