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

Redundancy in Imports #90

Conversation

colinmakerofthings
Copy link

Imports os twice is imported twice in both versions of badger_os.py. Once globally and once inside the state_save() function. This is redundant and the second import has been removed.

@Gadgetoid
Copy link
Member

IIRC the launcher which uses these functions deletes all imports - everything in locals() - so unless os is reimported here, the script will crash.

See:

for k in locals().keys():
if k not in ("gc", "file", "badger_os"):
del locals()[k]

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