Fix pep8 failures

pep8 with 1.6.x is now failing as it wants all imports at the
beginning of the file. Unfortunately, this does not work for us in
all circumstances. Therefore, ignore E402 and fix the E402's where
it actually makes sense.
This commit is contained in:
Craig Tracey 2015-02-12 16:18:57 -05:00
parent 5a78105d00
commit 0bd7df5e9b
3 changed files with 3 additions and 6 deletions

View File

@ -15,6 +15,7 @@
# License for the specific language governing permissions and limitations
import docker
import jinja2
import json
import logging
import os
@ -25,8 +26,6 @@ from giftwrap.builder import Builder
LOG = logging.getLogger(__name__)
import jinja2
DEFAULT_TEMPLATE_FILE = os.path.join(os.path.dirname(
os.path.dirname(__file__)),
'templates/Dockerfile.jinja2')

View File

@ -19,6 +19,7 @@ import os
import shutil
import tempfile
from giftwrap.builder import Builder
from giftwrap.gerrit import GerritReview
from giftwrap.openstack_git_repo import OpenstackGitRepo
from giftwrap.package import Package
@ -27,9 +28,6 @@ from giftwrap.util import execute
LOG = logging.getLogger(__name__)
from giftwrap.builder import Builder
class PackageBuilder(Builder):
def __init__(self, spec):

View File

@ -17,7 +17,7 @@ downloadcache = {toxworkdir}/_download
[testenv:pep8]
commands =
flake8 {posargs} {toxinidir}/giftwrap
flake8 {posargs} --ignore=E402 {toxinidir}/giftwrap
[testenv:venv]
commands = {posargs}