Explorar el Código

Update pep8, fix errors and freeze requirements-dev.txt

Signed-off-by: Aanand Prasad <[email protected]>
Aanand Prasad hace 10 años
padre
commit
c39a0b0a2d
Se han modificado 3 ficheros con 10 adiciones y 5 borrados
  1. 4 1
      compose/cli/log_printer.py
  2. 2 1
      compose/project.py
  3. 4 3
      requirements-dev.txt

+ 4 - 1
compose/cli/log_printer.py

@@ -39,9 +39,12 @@ class LogPrinter(object):
         color_fns = cycle(colors.rainbow())
         generators = []
 
+        def no_color(text):
+            return text
+
         for container in self.containers:
             if monochrome:
-                color_fn = lambda s: s
+                color_fn = no_color
             else:
                 color_fn = color_fns.next()
             generators.append(self._make_log_generator(container, color_fn))

+ 2 - 1
compose/project.py

@@ -15,7 +15,8 @@ def sort_service_dicts(services):
     temporary_marked = set()
     sorted_services = []
 
-    get_service_names = lambda links: [link.split(':')[0] for link in links]
+    def get_service_names(links):
+        return [link.split(':')[0] for link in links]
 
     def visit(n):
         if n['name'] in temporary_marked:

+ 4 - 3
requirements-dev.txt

@@ -1,5 +1,6 @@
 mock >= 1.0.1
-nose
+nose==1.3.4
 git+https://github.com/pyinstaller/pyinstaller.git@12e40471c77f588ea5be352f7219c873ddaae056#egg=pyinstaller
-unittest2
-flake8
+unittest2==0.8.0
+flake8==2.3.0
+pep8==1.6.1