Skip to content
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 error message and docstring for custom parameter in add_target() #1027

Merged
merged 2 commits into from
May 5, 2020

Conversation

joshuagl
Copy link
Member

@joshuagl joshuagl commented May 5, 2020

Please fill in the fields below to submit a pull request. The more information
that is provided, the better.

Fixes issue #: N/A

Description of the changes being introduced by the pull request:

  • Change the definition of CUSTOM_SCHEMA to better match the usage, it's a dictionary not an object. cc @SantiagoTorres
  • Update the docstring of add_target() to make the use of custom and fileinfo, that they are mutually exclusive and that we intend to deprecate custom much clearer.

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

Change CUSTOM_SCHEMA to a dictionary mapping AnyString to Any value. This
makes error reporting more indicative of what the expected value is, by
reporting something like:
  FormatError: Expected a dict but got ‘meta’

instead of:
  FormatError: Expected a object but got 'meta'

Signed-off-by: Joshua Lock <jlock@vmware.com>
Update the docstring to make it clear that 'custom' and 'fileinfo' are
mutually exclusive, and further that the 'custom' parameter will be
dropped in a future release.

Signed-off-by: Joshua Lock <jlock@vmware.com>
Copy link
Member

@SantiagoTorres SantiagoTorres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Way better. Thanks!

@SantiagoTorres SantiagoTorres merged commit 808ac0c into theupdateframework:develop May 5, 2020
@joshuagl joshuagl deleted the joshuagl/custom branch May 5, 2020 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants