Improve docstring of config.stringify_invalid ()

This commit is contained in:
Erik Montnemery 2023-11-14 14:05:46 +01:00 committed by GitHub
parent 94a2087ba0
commit 2d39eaf0a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -581,8 +581,9 @@ def find_annotation(
def stringify_invalid(ex: vol.Invalid) -> str:
"""Stringify voluptuous.Invalid.
Based on voluptuous.error.Invalid.__str__, the main modification
is to format the path delimited by -> instead of @data[].
This is an alternative to the custom __str__ implemented in
voluptuous.error.Invalid. The main modification is to format
the path delimited by -> instead of @data[].
"""
path = "->".join(str(m) for m in ex.path)
# This function is an alternative to the stringification done by