From 6e9d0d65b98fa54a0febd90b21b9310619da29d3 Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Fri, 22 Jul 2022 23:12:44 -0500 Subject: [PATCH] reformat with black --- st2common/st2common/util/config_loader.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/st2common/st2common/util/config_loader.py b/st2common/st2common/util/config_loader.py index bdc6634d2b..793df93482 100644 --- a/st2common/st2common/util/config_loader.py +++ b/st2common/st2common/util/config_loader.py @@ -96,7 +96,9 @@ def _get_values_for_config(self, config_schema_db, config_db): # If config_schema is available we do a second pass and set default values for required # items which values are not provided / available in the config itself - config = self._assign_subschema_default_values(schema=schema_values, instance=config) + config = self._assign_subschema_default_values( + schema=schema_values, instance=config + ) return config @staticmethod @@ -342,16 +344,10 @@ def _assign_default_values(self, schema, instance, can_replace_instance=False): if schema_type == "object": has_properties = schema.get("properties", None) has_pattern_properties = schema.get("patternProperties", None) - has_additional_properties = schema.get( - "additionalProperties", None - ) + has_additional_properties = schema.get("additionalProperties", None) # Inspect nested object properties - if ( - has_properties - or has_pattern_properties - or has_additional_properties - ): + if has_properties or has_pattern_properties or has_additional_properties: if not instance: instance = {}