You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Wildcard imports are widely agreed upon as a no-no in Python (see e.g. here or here). They are particularly bad when placed inside an init.py file because most people don't think to look there, and it can thus be very difficult to track down the location of an imported file. E.g. I was trying to find utils._int_antsProcessArguments only to see that it was imported through one of the wildcard imports within the utils directory, so I have no idea where it came from without searching through all those files (obviously not difficult, but annoying). and if I wasn't already attentive to look for this antipattern I would have been really confused!
Expected behavior
all imports should be explicit.
The text was updated successfully, but these errors were encountered:
Thanks for this suggestion! I've addressed this for the sub-modules in a new PR #533 . It's hard to make this change in the top-level init.py file without having a massive unreadable file.
Let me know if you have any other suggestions re: best practices.
Describe the bug
Wildcard imports are widely agreed upon as a no-no in Python (see e.g. here or here). They are particularly bad when placed inside an init.py file because most people don't think to look there, and it can thus be very difficult to track down the location of an imported file. E.g. I was trying to find
utils._int_antsProcessArguments
only to see that it was imported through one of the wildcard imports within the utils directory, so I have no idea where it came from without searching through all those files (obviously not difficult, but annoying). and if I wasn't already attentive to look for this antipattern I would have been really confused!Expected behavior
all imports should be explicit.
The text was updated successfully, but these errors were encountered: