Improve Parameter error messages#808
Merged
Merged
Conversation
Member
Author
|
@philippjfr this is ready. |
Member
|
Thanks. Now seems like a good chance to make the error message a bit cleaner. Instead of ", not type <class 'str'>", can it be either ", not <class 'str'>", or ", not type 'str'", (my preference, I think)? I'm a bit confused why it comes out that way right now, as if I do "type('st')" I get "str", not the confusing version. |
Member
Author
|
Yes that'd be a good idea! I won't have time to take care of that now though. |
Member
|
Ah, apparently Python only shows the |
Member
|
Personally I find |
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
philippjfr
reviewed
Aug 3, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
jbednar
reviewed
Aug 4, 2023
Co-authored-by: Philipp Rudiger <prudiger@anaconda.com>
jbednar
reviewed
Aug 4, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The error messages raised by Parameters are pretty inconsistent and often lack context.
For now with this PR I'm just seeking feedback on a utility I've added that builds a message supposed to prefix most of (if not all) the errors raised by Parameters. I've just adapted the type validation performed by
Numberto show the error messages emitted in various situations:(I'd hope to get this into the 2.0 release.)