trafaret.Int converts values while checking
See original GitHub issue((t.Int() | t.String()) & t.String())('0')
produces DataError: value is not a string
which is obviously not true. This also introduces bugs in aiohttp_admin.
t.Int().check(..., convert=False)
also converts string to int
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Introducing trafaret — Trafaret 1.0.0 documentation
Introducing trafaret¶ ; Int will not convert numbers to integers, this mean that some checkers, like ; String with regular expression, have special...
Read more >Trafaret Documentation - Read the Docs
This does not mean that Int will not convert numbers to integers, ... Check if value is a float or can be converted...
Read more >How do I check if a string represents a number (float or int)?
The issue is that any numeric conversion function has two kinds of results ... Discard "NaN" (not a number) strings while checking for...
Read more >Python Examples of trafaret.Null - ProgramCreek.com
DataError) as res: await trafaret.async_check('blablabla') assert res.value.as_dict() == { 0: 'value can\'t be converted to int', 1: 'value should be None', }.
Read more >Handlebars Helpers Reference | BigCommerce Dev Center
When used in conjunction with the built-in {{each}} helper, returns retrieved values in an array. Parameters. limit , limit-value : Optional parameters to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Merged. Use t.RawInt instead of t.Int to just check and not convert
Check this https://github.com/Deepwalker/trafaret/pull/73