__all__ should go before imports in Python code

As per PEP8: __all__ statements in Python code should go after from __future__ import absolute_import, division, print_function but before any other import statements. The Python style guide has been updated accordingly. Formerly we asked that __all__ statements come after all imports (following an older version of PEP8).

Note that some old versions of the flake8 linter will complain about this. Please update your flake8 if necessary.

3 Likes

When I look at the style guide it shows __all__ coming after the imports.

See https://developer.lsst.io/coding/python_style_guide.html#standard-code-order-should-be-followed

Being rebuilt as we speak, I believe.

This is DM-9596 and it was just merged to master, so it may take awhile to show up. Meanwhile you can see the new text here