Update pre-commit config to enforace that future imports exist in all files.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2015-10-30 16:22:51 -04:00
parent ed87d1f848
commit 475a091768
31 changed files with 66 additions and 1 deletions

View File

@ -14,7 +14,12 @@
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: git://github.com/asottile/reorder_python_imports
sha: 3d86483455ab5bd06cc1069fdd5ac57be5463f10
sha: v0.1.0
hooks:
- id: reorder-python-imports
language_version: 'python2.7'
args:
- --add-import
- from __future__ import absolute_import
- --add-import
- from __future__ import unicode_literals

View File

@ -1,3 +1,4 @@
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.6.0dev'

View File

@ -1,3 +1,4 @@
from __future__ import absolute_import
from __future__ import unicode_literals
NAMES = [
'grey',

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import logging
import os

View File

@ -1,4 +1,5 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from textwrap import dedent

View File

@ -1,3 +1,4 @@
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

View File

@ -1,4 +1,5 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from threading import Thread

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import functools
import logging
import pprint

View File

@ -1,4 +1,7 @@
# flake8: noqa
from __future__ import absolute_import
from __future__ import unicode_literals
from .config import ConfigurationError
from .config import DOCKER_CONFIG_KEYS
from .config import find

View File

@ -1,4 +1,5 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import codecs
import logging

View File

@ -1,3 +1,7 @@
from __future__ import absolute_import
from __future__ import unicode_literals
class ConfigurationError(Exception):
def __init__(self, msg):
self.msg = msg

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import logging
import os
from string import Template

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import json
import logging
import os

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import sys

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from compose import utils

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import codecs
import hashlib
import json

View File

@ -1,5 +1,7 @@
#!/usr/bin/env python
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import datetime
import os.path

View File

@ -21,7 +21,9 @@ For example, if the list of versions is:
`default` would return `1.7.1` and
`recent -n 3` would return `1.8.0-rc2 1.7.1 1.6.2`
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import itertools

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import sys
if sys.version_info >= (2, 7):

View File

@ -1,4 +1,5 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import shlex

View File

@ -1,3 +1,4 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import random

View File

@ -2,6 +2,7 @@
Integration tests which cover state convergence (aka smart recreate) performed
by `docker-compose up`.
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import py

View File

@ -1,4 +1,5 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import pytest
from requests.exceptions import ConnectionError

View File

@ -1,4 +1,5 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import logging

View File

@ -1,5 +1,7 @@
# encoding: utf-8
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import os
import shutil

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from compose.config.errors import DependencyError
from compose.config.sort_services import sort_service_dicts
from compose.config.types import VolumeFromSpec

View File

@ -1,3 +1,4 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import docker

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import unittest
from compose.config.interpolation import BlankDefaultDict as bddict

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import unittest
from compose.cli.multiplexer import Multiplexer

View File

@ -1,3 +1,4 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import docker

View File

@ -1,4 +1,5 @@
# encoding: utf-8
from __future__ import absolute_import
from __future__ import unicode_literals
from compose import utils