Bring back argname
or help to figure out the way to do the same.
#438
Labels
argname
or help to figure out the way to do the same.
#438
Things to check first
Feature description
I've wanted to update
typeguard
dependency in project from version2.13.3
to latest, which is4.1.5
. Coincidently previous version had exactly what we needed which is type checking + custom message on error but since3.0.0
it was dropped.Is there any workaround that I'm not aware of? Will you consider to bring that feature back?
Use case
We have test which goes roughly like this:
We check for exact value or data type match defined by either regular types like
str
or using types fromtyping
module.Old error message:
TypeError: type of returned key3 value must be str; got bool instead
New error message (without 1st argument):
typeguard.TypeCheckError: bool is not an instance of str
As you can see in our case old message allowed us to know instantly for which key the value was incorrect but in new version there is no way to customize it.
The text was updated successfully, but these errors were encountered: