Commit Graph

23 Commits

Author SHA1 Message Date
Tin Tvrtković 588fe48019 Simplify asdict and has (#48) 2016-08-08 08:44:30 +02:00
Tin Tvrtković d10e5c41d6 asdict - propagate dict_factory properly (#45)
* asdict - propagate dict_factory properly. Hypothesis tests.

* Disable Hypothesis health checks on Travis/PyPy.

* Tox - pass the HYPOTHESIS_PROFILE environment variable.

* Shut up pytest again.
2016-06-02 15:40:15 -07:00
Tin Tvrtkovic 88f33a9375 Review feedback. 2016-05-15 02:00:36 +02:00
Tin Tvrtkovic 17a48c3bc3 Fix comments. 2016-05-08 23:50:53 +02:00
Tin Tvrtkovic cd80208187 Initial dict_factory support for asdict. 2016-05-07 19:55:09 +02:00
Hynek Schlawack 980067d8f1 We're ASCII-clean 2015-02-20 11:22:10 +01:00
Hynek Schlawack 08ff764de7 Pass instances into validators
Also construct the instance first and then run all validators on it.

This allows for cross-attribute validation.
2015-02-09 13:16:56 +01:00
Hynek Schlawack 15d568a2cc Validate only if there's a validator
Fixes #5
2015-02-09 12:01:51 +01:00
Hynek Schlawack ddf0256527 Rename skip to filter and reverse logic 2015-02-06 14:56:02 +01:00
Hynek Schlawack 1bcecf3970 Only recurse into list items if they are ours 2015-02-04 16:32:18 +01:00
Hynek Schlawack 2321fc202a Recurse into containers too, add skip in asdict 2015-02-04 16:12:32 +01:00
Hynek Schlawack c8c7a60389 Rename valid to validate
valid kind of implies a boolean return code.
2015-02-02 14:04:47 +01:00
Hynek Schlawack 2cab907370 Add attr.valid 2015-02-02 12:13:11 +01:00
Hynek Schlawack 16d9c464e3 Rename ls to fields 2015-01-29 21:55:25 +01:00
Hynek Schlawack b79c3afec3 Rename to_dict to asdict
For stdlib compatability.
2015-01-29 21:50:07 +01:00
Hynek Schlawack 7aaab84091 Add assoc 2015-01-29 20:50:42 +01:00
Hynek Schlawack 4f62d47d08 We don't need three names for the same thing 2015-01-29 19:39:49 +01:00
Hynek Schlawack 8f98b38136 Increase branch coverage
And a lot of under the hood work.
2015-01-29 17:31:49 +01:00
Hynek Schlawack 692e4613a0 Add instance_of validator 2015-01-29 12:20:17 +01:00
Hynek Schlawack d291e8c4dc Add some API docs
Also define ls and has only for classes.
2015-01-28 15:16:42 +01:00
Hynek Schlawack fdd41b0466 Rename s to _add_methods
...and rename within __init__.py
2015-01-28 12:38:54 +01:00
Hynek Schlawack 104e663551 Add `has` 2015-01-28 11:34:30 +01:00
Hynek Schlawack 9560908555 Initial commit
Docs aren't there yet
2015-01-27 17:53:17 +01:00