Skip to content

Commit 86d6b89

Browse files
authored
fix(typing): Ignore [arg-type] error in _deduplicate_enum_errors (#3475)
* fix(typing): Confirm arg type before joining in `_deduplicate_enum_errors` Fixes `mypy` error that appeared during a merge #3467 (comment) * revert: undo last commit * revert: Ignore type error introduced by `typeshed` The issue is not related to any runtime changes python-jsonschema/jsonschema#1019 (comment)
1 parent 53ee187 commit 86d6b89

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

altair/utils/schemapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def _deduplicate_enum_errors(errors: ValidationErrorList) -> ValidationErrorList
420420
# Values (and therefore `validator_value`) of an enum are always arrays,
421421
# see https://json-schema.org/understanding-json-schema/reference/generic.html#enumerated-values
422422
# which is why we can use join below
423-
value_strings = [",".join(err.validator_value) for err in errors]
423+
value_strings = [",".join(err.validator_value) for err in errors] # type: ignore
424424
longest_enums: ValidationErrorList = []
425425
for value_str, err in zip(value_strings, errors):
426426
if not _contained_at_start_of_one_of_other_values(value_str, value_strings):

tools/schemapi/schemapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def _deduplicate_enum_errors(errors: ValidationErrorList) -> ValidationErrorList
418418
# Values (and therefore `validator_value`) of an enum are always arrays,
419419
# see https://json-schema.org/understanding-json-schema/reference/generic.html#enumerated-values
420420
# which is why we can use join below
421-
value_strings = [",".join(err.validator_value) for err in errors]
421+
value_strings = [",".join(err.validator_value) for err in errors] # type: ignore
422422
longest_enums: ValidationErrorList = []
423423
for value_str, err in zip(value_strings, errors):
424424
if not _contained_at_start_of_one_of_other_values(value_str, value_strings):

0 commit comments

Comments
 (0)