Merge pull request #2300 from dnephin/always_unicode_literal

Use "unicode_literals" in all files
This commit is contained in:
Aanand Prasad 2016-01-07 18:28:22 +00:00
commit e7bba2affe
36 changed files with 82 additions and 3 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,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from compose.cli.main import main
main()

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
from compose.config.errors import DependencyError

View File

@ -1,3 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import json
import logging
import os
@ -251,7 +254,8 @@ def _parse_oneof_validator(error):
)
return "{}contains {}, which is an invalid type, it should be {}".format(
invalid_config_key,
context.instance,
# Always print the json repr of the invalid value
json.dumps(context.instance),
_parse_valid_types_from_validator(context.validator_value))
if context.validator == 'uniqueItems':

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,3 +1,4 @@
from __future__ import absolute_import
from __future__ import unicode_literals

View File

@ -1,5 +1,7 @@
#!/usr/bin/env python
from __future__ import absolute_import
from __future__ import print_function
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,3 +1,4 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from docker.errors import DockerException

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
@ -550,7 +552,9 @@ class ConfigTest(unittest.TestCase):
)
def test_config_extra_hosts_list_of_dicts_validation_error(self):
expected_error_msg = "key 'extra_hosts' contains {'somehost': '162.242.195.82'}, which is an invalid type, it should be a string"
expected_error_msg = (
"key 'extra_hosts' contains {\"somehost\": \"162.242.195.82\"}, "
"which is an invalid type, it should be a string")
with self.assertRaisesRegexp(ConfigurationError, expected_error_msg):
config.load(

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,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import pytest
from compose.config.errors import ConfigurationError

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