Fix Version/s: None
Component/s: Requirements Documents
Sprint:Alert Production S17 - 4
The Python coding standards say that __all__ = ... should go after all imports:
However, PEP8 specifically states in Module level dunder names that it should go before any imports except from __future__ import ....
In my opinion the PEP8 standard makes the code more readable (by advertising the public symbols right away) and I can't think of any good reason to violate it (other than past history). I suggest we updated our coding standards accordingly.
Pull request made. I also removed mention of test suites at the end (as per a "fixme"), but that is a second commit and can be easily dropped if desired.
Looks OK, with one possible change to the wording (up to you whether to make it).
Do current linting/autoformatting tools conform to this, or do they leave this unchecked?
Since this represents a change to current practice, please publicize it on Community.
I updated the wording to Imports (other than... (I won't type it all out here, since JIRA preformatted text is so painful).
Current flake8 does conform to the new/current rule and autopep8 at least leaves correct code unmolested.
There are old versions of flake8 that do not conform to this rule, and I don't know when it changed. I don't know anything about other linters,
The bullet list at https://developer.lsst.io/coding/python_style_guide.html#standard-code-order-should-be-followed presently reads:
I suggest that instead it read: