Inspectopedia Help

Improper position of from __future__ import

Reports from __future__ import statements that are used not at the beginning of a file.


a = 1 from __future__ import print_function print()

When the quick-fix is applied, the code changes to:

from __future__ import print_function a = 1 print()

Inspection Details

Available in:

DataSpell 2023.3, PyCharm 2023.3


Python Community Edition, 233.SNAPSHOT

Last modified: 13 July 2023