New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve formatting of config validation errors #103957
Conversation
Hey there @PhracturedBlue, @tetienne, @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Note: This PR will need to be rebased once #103959 is merged |
Do you have a preferred order of merging of these PRs? |
is to format the path delimited by -> instead of @data[]. | ||
""" | ||
path = "->".join(str(m) for m in ex.path) | ||
output = Exception.__str__(ex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output = Exception.__str__(ex) | |
output = str(ex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That won't work because this function is meant as an alternative to the stringification done by vol.Invalid.__str__
. I'll add a comment explaining this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll explain this further in a follow up.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
dca3b8e
to
3c2992b
Compare
Proposed change
Improve formatting of config validation errors:
With this PR:
Without this PR:
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: