Bläddra i källkod

Merge pull request #7380 from joehattori/simplify-code

Simplify code in compose/config/config.py
Ulysses Souza 5 år sedan
förälder
incheckning
0979c7a1fe
1 ändrade filer med 1 tillägg och 3 borttagningar
  1. 1 3
      compose/config/config.py

+ 1 - 3
compose/config/config.py

@@ -505,9 +505,7 @@ def load_services(config_details, config_file, compatibility=False, interpolate=
         file.get_service_dicts() for file in config_details.config_files
     ]
 
-    service_config = service_configs[0]
-    for next_config in service_configs[1:]:
-        service_config = merge_services(service_config, next_config)
+    service_config = functools.reduce(merge_services, service_configs)
 
     return build_services(service_config)