Skip to content

Commit 2b635bf

Browse files
author
Sergio García Prado
committed
Merge remote-tracking branch 'origin/issue-150-config-v2' into issue-150-refactor-broker-builder-classes
2 parents fcfc6cf + 7669030 commit 2b635bf

File tree

1 file changed

+4
-4
lines changed
  • packages/core/minos-microservice-common/minos/common/config

1 file changed

+4
-4
lines changed

packages/core/minos-microservice-common/minos/common/config/abc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ def get_by_key(self, key: str) -> Any:
284284

285285
def _fn(k: str, data: dict[str, Any], previous: str) -> Any:
286286
current, _sep, following = k.partition(".")
287-
288287
full = f"{previous}.{current}".lstrip(".")
288+
289289
with suppress(KeyError):
290290
return self._parameterized[self._to_parameterized_variable(full)]
291291

@@ -299,14 +299,14 @@ def _fn(k: str, data: dict[str, Any], previous: str) -> Any:
299299
return part
300300

301301
result = dict()
302-
for kk in part:
303-
result[kk] = _fn(kk, part, full)
302+
for subpart in part:
303+
result[subpart] = _fn(subpart, part, full)
304304
return result
305305

306306
return _fn(following, part, full)
307307

308308
try:
309-
return _fn(key, self._data, "")
309+
return _fn(key, self._data, str())
310310
except Exception:
311311
raise MinosConfigException(f"{key!r} field is not defined on the configuration!")
312312

0 commit comments

Comments
 (0)