(
key: str, validators: dict[str, Callable[[Any, Any], Any]], normed_key: Optional[str] = None
)
| 808 | |
| 809 | |
| 810 | def _get_validator( |
| 811 | key: str, validators: dict[str, Callable[[Any, Any], Any]], normed_key: Optional[str] = None |
| 812 | ) -> Callable[[Any, Any], Any]: |
| 813 | normed_key = normed_key or key |
| 814 | try: |
| 815 | return validators[normed_key] |
| 816 | except KeyError: |
| 817 | suggestions = get_close_matches(normed_key, validators, cutoff=0.2) |
| 818 | raise_config_error(key, suggestions) |
| 819 | |
| 820 | |
| 821 | def validate(option: str, value: Any) -> tuple[str, Any]: |
no test coverage detected