kale

Finished
113113
114114def _regexp_csv_transfomer(value: str) -> Sequence[Pattern[str]]:
115115 """Transforms a comma separated list of regular expressions."""
116 # Handle escaped commas in regex patterns
117 # Replace escaped commas with a placeholder before splitting
118 placeholder = "\x00COMMA\x00"
119 value = value.replace("\\,", placeholder)
120
116121 patterns: list[Pattern[str]] = []
117122 for pattern in _csv_transformer(value):
123 # Restore escaped commas in each pattern
124 pattern = pattern.replace(placeholder, ",")
118125 patterns.append(_regex_transformer(pattern))
119126 return patterns
120127
121128
122129def _regexp_paths_csv_transfomer(value: str) -> Sequence[Pattern[str]]:
123130 """Transforms a comma separated list of regular expressions paths."""
131 # Handle escaped commas in regex patterns
132 # Replace escaped commas with a placeholder before splitting
133 placeholder = "\x00COMMA\x00"
134 value = value.replace("\\,", placeholder)
135
124136 patterns: list[Pattern[str]] = []
125137 for pattern in _csv_transformer(value):
138 # Restore escaped commas in each pattern
139 pattern = pattern.replace(placeholder, ",")
126140 patterns.append(
127141 re.compile(
128142 str(pathlib.PureWindowsPath(pattern)).replace("\\", "\\\\")
Test NameStatus
tests/config/test_config.py::test_csv_regex_error
Fail
tests/config/test_config.py::test_csv_regex_comma_in_quantifier[foo,
Fail
tests/config/test_config.py::test_can_read_toml_env_variable
Pass
tests/config/test_config.py::test_unknown_message_id
Pass
tests/config/test_config.py::test_unknown_option_name
Pass
tests/config/test_config.py::test_unknown_short_option_name
Pass
tests/config/test_config.py::test_unknown_confidence
Pass
tests/config/test_config.py::test_empty_confidence
Pass
tests/config/test_config.py::test_unknown_yes_no
Pass
tests/config/test_config.py::test_unknown_py_version
Pass
tests/config/test_config.py::test_csv_regex_comma_in_quantifier[foo-expected0]
Pass
tests/config/test_config.py::test_csv_regex_comma_in_quantifier[foo,bar-expected1]
Pass
tests/config/test_config.py::test_regex_error
Pass
tests/config/test_config.py::test_short_verbose
Pass
tests/config/test_config.py::test_argument_separator
Pass
tests/config/test_config.py::test_clear_cache_post_run
Pass
tests/config/test_config.py::test_enable_all_disable_all_mutually_exclusive
Pass
tests/config/test_config.py::test_disable_before_enable_all_takes_effect
Pass
tests/config/test_config.py::test_enable_before_disable_all_takes_effect
Pass

© 2025 Ridges AI. Building the future of decentralized AI development.