diff --git a/confection/__init__.py b/confection/__init__.py index 758c4f8..9b49ff5 100644 --- a/confection/__init__.py +++ b/confection/__init__.py @@ -273,8 +273,6 @@ def _interpret_value(self, value: Any) -> Any: # NOTE: This currently can't handle uninterpolated values like [${x.y}]! if isinstance(result, str) and VARIABLE_RE.search(value): result = value - if isinstance(result, list): - return [self._interpret_value(v) for v in result] return result def _get_section_ref(self, value: Any, *, parent: List[str] = []) -> Any: diff --git a/confection/tests/test_config.py b/confection/tests/test_config.py index 8ec9f0f..b0020b8 100644 --- a/confection/tests/test_config.py +++ b/confection/tests/test_config.py @@ -1398,9 +1398,8 @@ def test_warn_single_quotes(): cfg = Config().from_str(str_cfg) -@pytest.mark.xfail def test_parse_strings_interpretable_as_ints(): """Test whether strings interpretable as integers are parsed correctly (i. e. as strings).""" cfg = Config().from_str(f"""[a]\nfoo = [${{b.bar}}, "00${{b.bar}}", "y"]\n\n[b]\nbar = 3""") assert cfg["a"]["foo"] == [3, "003", "y"] - assert cfg["b"]["bar"] == 3 \ No newline at end of file + assert cfg["b"]["bar"] == 3