Definition of "Dunder" (Double underscore): http://www.urbandictionary.com/define.php?term=Dunder
is a global "variable" and should therefore appear below the imports.
Module level "dunders" (i.e. names with two leading and two trailing
underscores) such as,
__author__, etc. should
be placed after the module docstring but before any import statements
except fromimports. Python mandates that future-imports
must appear in the module before any other code except docstrings.
"""This is the example module.
This module does stuff.
from __future__ import barry_as_FLUFL
__all__ = ['a', 'b', 'c']
__version__ = '0.1'
__author__ = 'Cardinal Biggles'
PEP8: module level import not at top of file
PEP 8 recently was updated to put the location before the imports. See revision cf8e888b9555, committed on June 7th, 2016:
Put all module level dunders together in the same location, and remove the redundant version bookkeeping information.
Closes #27187. Patch by Ian Lee.
The text was further updated the next day to address the
from __future__ import ... caveat.
Before this change, as there was no clear guideline on module-level dunder globals, so PyCharm and the other answer were correct at the time. I'm not sure how PyCharm implements their PEP 8 checks; if they use the pycodestyle project (the defacto Python style checker), then I'm sure it'll be fixed automatically. Otherwise, perhaps file a bug with them to see this fixed.