Auto __all__
generator
#2666
rjkilpatrick
started this conversation in
Enhancement
Replies: 3 comments
-
@rjkilpatrick, thanks for the suggestion. We will review this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This would be a big timesaver, did it ever get implemented? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When creating an
__init__.py
, it is recommended to create an__all__
list, explicitly containing the public API at the top of the file in an easy to read manner. It also controls what is pulled into a namespace, and whilstfrom package import *
is not recommended, this at least protects the private API.I think an automatic generator that parses the active file and generates the
__all__
variable from the classes/functions available, would speed up development time, and encourage good practice.Beta Was this translation helpful? Give feedback.
All reactions