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

🐛 FIX: NeedImport logic #1006

Merged
merged 1 commit into from
Sep 3, 2023
Merged

🐛 FIX: NeedImport logic #1006

merged 1 commit into from
Sep 3, 2023

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Sep 1, 2023

@danwos unless I am missing something (?) I think this is broken, since getattr is used on a dictionary, instead of dict.get, so they will always return the default None.

Also improved efficiency, by using json.load instead of json.loads, and not recreating the known_options list within a loop

@chrisjsewell chrisjsewell requested a review from danwos September 1, 2023 10:13
Copy link
Member

@danwos danwos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great finding and thanks for the fix and the optimization.
Looks all good to me.

@chrisjsewell
Copy link
Member Author

Cheers, just have to work out the test failure

@chrisjsewell chrisjsewell changed the title 🐛 FIX: NeedImport logic 🐛 FIX: NeedImport logic Sep 3, 2023
@chrisjsewell chrisjsewell merged commit 86d7da7 into master Sep 3, 2023
@chrisjsewell chrisjsewell deleted the fix-needimport branch September 3, 2023 10:07
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.

2 participants