PEP8 suggests that:
Imports should be grouped in the following order:
1. standard library imports
2. related third party imports
3. local application/library specific imports
You should put a blank line between each group of imports.
I am using Flake8Lint , which is a Sublime Text plugin for Python Lint files.
My code is as below:
import logging
import re
import time
import urllib
import urlparse
from flask import Blueprint
from flask import redirect
from flask import request
from flask.ext.login import current_user
from flask.ext.login import login_required
from my_application import one_module
it will show a warning as below:
Import statementsare in the wrong order, from my_application should be up from from flask.ext.login.
but the checkbox is a third-party library, it should be before my import my_application. That's why? How to fix it?
source
share