| 53 | 53 | return pylint_utils._check_csv(value) |
| 54 | 54 | |
| 55 | 55 | |
| 56 | def _csv_transformer_escaped(value: str) -> Sequence[str]: | |
| 57 | """Transforms a comma separated string with escaped comma support.""" | |
| 58 | return pylint_utils._check_csv_escaped(value) | |
| 59 | ||
| 60 | ||
| 56 | 61 | YES_VALUES = {"y", "yes", "true"} |
| 57 | 62 | NO_VALUES = {"n", "no", "false"} |
| 58 | 63 | |
| 119 | 124 | return patterns |
| 120 | 125 | |
| 121 | 126 | |
| 127 | def _regexp_csv_transfomer_escaped(value: str) -> Sequence[Pattern[str]]: | |
| 128 | """Transforms a comma separated list of regular expressions with escaped comma support.""" | |
| 129 | patterns: list[Pattern[str]] = [] | |
| 130 | for pattern in _csv_transformer_escaped(value): | |
| 131 | patterns.append(_regex_transformer(pattern)) | |
| 132 | return patterns | |
| 133 | ||
| 134 | ||
| 122 | 135 | def _regexp_paths_csv_transfomer(value: str) -> Sequence[Pattern[str]]: |
| 123 | 136 | """Transforms a comma separated list of regular expressions paths.""" |
| 124 | 137 | patterns: list[Pattern[str]] = [] |
| 144 | 157 | "glob_paths_csv": _glob_paths_csv_transformer, |
| 145 | 158 | "py_version": _py_version_transformer, |
| 146 | 159 | "regexp": _regex_transformer, |
| 147 | "regexp_csv": _regexp_csv_transfomer, | |
| 160 | "regexp_csv": _regexp_csv_transfomer_escaped, | |
| 148 | 161 | "regexp_paths_csv": _regexp_paths_csv_transfomer, |
| 149 | 162 | "string": pylint_utils._unquote, |
| 150 | 163 | "yn": _yn_transformer, |
| Test Name | Status |
|---|---|
tests/config/test_config.py::test_csv_regex_error | 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_csv_regex_comma_in_quantifier[foo, | 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.