Python accepts non-string objects in __all__ as long as modules are only imported via 'import X'. If __all__ is inspected due to a from import and non-string objects are found, an exception is raised. Pylint should be able to detect problems like this.
Example:
def foo():
__all__ = [foo]
Expected: | |
| priority | normal |
|---|---|
| type | enhancement |
| appeared in | <not specified> |
| done in | 0.27.0 |
| load left | 0.000 |
| closed by | #869:cf3e66c40cd8 |


#112698 Non-inferable __all__ and non-string objects in __all__ make pylint cras...