Skip to content

String values cannot contain $ #48

@MartinBernstorff

Description

@MartinBernstorff

Minimal example:

from confection import Config

config_str = """[section]
value='^test$'
"""

Config().from_str(config_str)

Would love to be able to have regex strings in my config, e.g. for using polars.exclude to filter columns.

Raises:

InterpolationSyntaxError
'$' must be followed by '$' or '{', found: '$'
  File "C:\Users\adminmanber\Desktop\psycop-common\psycop\common\model_training_v2\config\config_utils.py", line 33, in <module>
    Config().from_str(config_str)
configparser.InterpolationSyntaxError: '$' must be followed by '$' or '{', found: '$'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions