Closed
Description
Description
Many Python files in the repo use the __all__
array to limit exported objects. Every item in the list should be a string containing the names of the exported variables.
Currently the variable contains the variables themselves instead of their names, like this.
def set_labels(*args):
pass
__all__ = [set_labels]
Instead the correct way which would be this.
- __all__ = [set_labels]
+ __all__ = ["set_labels"]
Reproduction
- Try wildcard importing from any such file.
from set_labels import *
- See error.
TypeError: Item in set_labels.__all__ must be str, not function
Expectation
Wildcard imports, while discouraged, should still work.
Resolution
- I would be interested in resolving this bug.