Skip to content

Commit

Permalink
Update docutils_.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Dec 28, 2021
1 parent 8b6d2d8 commit fb7e41a
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions myst_parser/docutils_.py
Expand Up @@ -23,19 +23,6 @@ def _validate_int(
return int(value)


def _create_validate_choice(choices: Sequence[str]) -> Callable[..., str]:
"""Create a validator for a choice from a sequence of strings."""

def _validate(
setting, value, option_parser, config_parser=None, config_section=None
):
if value not in choices:
raise ValueError(f"Expecting one of {choices!r}, got {value}.")
return value

return _validate


def _create_validate_tuple(length: int) -> Callable[..., Tuple[str, ...]]:
"""Create a validator for a tuple of length `length`."""

Expand Down

0 comments on commit fb7e41a

Please sign in to comment.