-
Notifications
You must be signed in to change notification settings - Fork 16
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
small validation error message formatting fix #575
small validation error message formatting fix #575
Conversation
d0c1702
to
32337b4
Compare
@@ -243,7 +243,7 @@ def _validate(self, instance: Dict) -> None: | |||
@staticmethod | |||
def _build_message_from_errors(errors: List[jsonschema.ValidationError]) -> str: | |||
"""Build an error message from validation errors.""" | |||
path = lambda error: ".".join(list(error.path)) # noqa # type: ignore | |||
path = lambda error: "::".join(map(str, error.path)) # noqa |
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.
error was on constructing error message string.
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.
during the investigation another place of improvement was found:
#576
32337b4
to
901f201
Compare
Codecov ReportBase: 93.38% // Head: 93.38% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #575 +/- ##
==========================================
- Coverage 93.38% 93.38% -0.01%
==========================================
Files 353 353
Lines 28451 28451
==========================================
- Hits 26569 26568 -1
- Misses 1882 1883 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
LGTM, just one suggestion you can choose to accept it
@@ -243,7 +243,7 @@ def _validate(self, instance: Dict) -> None: | |||
@staticmethod | |||
def _build_message_from_errors(errors: List[jsonschema.ValidationError]) -> str: | |||
"""Build an error message from validation errors.""" | |||
path = lambda error: ".".join(list(error.path)) # noqa # type: ignore | |||
path = lambda error: "::".join(map(str, error.path)) # noqa |
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.
path = lambda error: "::".join(map(str, error.path)) # noqa | |
path = lambda error: ".".join(map(str, error.path)) # noqa |
Proposed changes
small validation error message formatting fix
Fixes
#562
Types of changes
Checklist
Put an
x
in the boxes that apply.develop
branch (left side). Also you should start your branch off ourdevelop
.Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
DELETE INCLUSIVE THIS AND BELOW FOR STANDARD PR
Release summary
Version number: [e.g. 1.0.1]
Release details
Describe in short the main changes with the new release.
Checklist
Put an
x
in the boxes that apply.main
branch (left side), fromdevelop
aea packages lock --check
)HISTORY.md
for this releaseaea/__version__.py
file.latest
(check the READMEs of
aea-develop
and
aea-user
)aea
to PyPI.Further comments
Write here any other comment about the release, if any.