Improve docstring of config.stringify_invalid (#103965)
This commit is contained in:
parent
94a2087ba0
commit
2d39eaf0a2
1 changed files with 3 additions and 2 deletions
|
@ -581,8 +581,9 @@ def find_annotation(
|
||||||
def stringify_invalid(ex: vol.Invalid) -> str:
|
def stringify_invalid(ex: vol.Invalid) -> str:
|
||||||
"""Stringify voluptuous.Invalid.
|
"""Stringify voluptuous.Invalid.
|
||||||
|
|
||||||
Based on voluptuous.error.Invalid.__str__, the main modification
|
This is an alternative to the custom __str__ implemented in
|
||||||
is to format the path delimited by -> instead of @data[].
|
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)
|
path = "->".join(str(m) for m in ex.path)
|
||||||
# This function is an alternative to the stringification done by
|
# This function is an alternative to the stringification done by
|
||||||
|
|
Loading…
Add table
Reference in a new issue