Skip to content

Commit

Permalink
note about needed refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle committed Jan 25, 2024
1 parent ac14a42 commit e655b92
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pydantic/_internal/_validators.py
Expand Up @@ -31,6 +31,11 @@ def sequence_validator(
{'type_name': value_type.__name__},
)

# TODO: refactor sequence validation to validate with either a list or a tuple
# schema, depending on the type of the value.
# Additionally, we should be able to remove one of either this validator or the
# SequenceValidator in _std_types_schema.py (preferably this one, while porting over some logic).
# Effectively, a refactor for sequence validation is needed.
if value_type == tuple:
__input_value = list(__input_value)

Expand Down

0 comments on commit e655b92

Please sign in to comment.