pylint #112728 Warn about non-string objects in __all__ [validation pending]
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 |
done in | 0.27.0 |
load left | 0.000 |
closed by | #cf3e66c40cd8 Emit a warning if __all__ contains non-string objects. |