From 7c1f166bd3cf6ddef9eb52bd47ab8f9da616ae83 Mon Sep 17 00:00:00 2001 From: joel5vega Date: Wed, 20 Dec 2023 07:16:02 -0400 Subject: [PATCH] with pre-commit run --- src/sugar/sugar.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/sugar/sugar.py b/src/sugar/sugar.py index 56f0d74..b718ec4 100644 --- a/src/sugar/sugar.py +++ b/src/sugar/sugar.py @@ -121,7 +121,6 @@ def _check_config_file(self): def _filter_service_group(self): groups = self.config['groups'] - if not self.args.get('service_group'): default_group = self.defaults.get('group') if not default_group: @@ -136,8 +135,7 @@ def _filter_service_group(self): default_project_name = self.defaults.get('project-name') - for group_name,group_data in groups.items(): - + for group_name, group_data in groups.items(): if group_name == selected_group_name: if default_project_name and 'project-name' not in group_data: # just use default value if "project-name" is not set @@ -147,9 +145,13 @@ def _filter_service_group(self): # use as default all the services available default_services = [ service['name'] - for service in group_data.get('services', {}).get('available') + for service in group_data.get('services', {}).get( + 'available' + ) ] - group_data['services']['default'] = ','.join(default_services) + group_data['services']['default'] = ','.join( + default_services + ) self.service_group = group_data return