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
f7597c795f
Clarify backward compatibility + polish API docs
2015-02-01 19:27:36 +01:00
Hynek Schlawack
82892487fb
Remove assignment validation again
...
Mainly because:
1. I don't want to encourage mutations.
2. It's impossible to protect the attributes from becoming invalid anyway so
this is a lot of complexity (and __setattr__ overwriting) but only little
benefit.
2015-01-31 18:01:31 +01:00
Hynek Schlawack
e7ebf4bf81
Allow single attributes to be excluded
2015-01-30 17:48:34 +01:00
Hynek Schlawack
943d686509
Validate assignments
2015-01-30 13:30:47 +01:00
Hynek Schlawack
5753281838
Add attrs.make_class
2015-01-30 08:57:33 +01:00
Hynek Schlawack
f61fb5d185
Eliminate factory field
...
Instead, have only one default field. If the default value is an instance of
attr.Factory, use it as a factory.
2015-01-29 23:10:56 +01:00
Hynek Schlawack
717dcdadca
Short default_value to default
2015-01-29 22:32:41 +01:00
Hynek Schlawack
9cb48a5814
Shorten default_factory to factory
2015-01-29 22:29:37 +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
8bb430cf18
Add basic support for zope.interface
2015-01-29 19:04:23 +01:00
Hynek Schlawack
2040ed5e48
Replace motto
2015-01-29 17:33:58 +01:00
Hynek Schlawack
3e45f0559e
Strip underscore for __init__
...
There is not such thing as private parameters.
2015-01-29 13:05:04 +01:00
Hynek Schlawack
0e2507d51d
Add an example of a custom validator
2015-01-29 12:26:25 +01:00
Hynek Schlawack
692e4613a0
Add instance_of validator
2015-01-29 12:20:17 +01:00
Hynek Schlawack
69a460d336
Add no-nonsense aliases for attr.s and attr.ib
...
I like the original ones but let's not give haters extra ammunition. :)
2015-01-29 10:17:08 +01:00
Hynek Schlawack
8bfa3a3c6f
Don't strip teaser
2015-01-29 09:13:16 +01:00
Hynek Schlawack
6de5136f4a
Add some examples
2015-01-28 18:18:16 +01:00
Hynek Schlawack
3f2fd8317d
More doc polishing
2015-01-28 16:55:45 +01:00
Hynek Schlawack
d5d3dfcdb5
Some minor doc polish
2015-01-28 16:02:18 +01:00
Hynek Schlawack
372c55318c
Add validators
2015-01-28 15:54:41 +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
89b4b4462e
Linkify characteristic
2015-01-28 12:59:01 +01:00
Hynek Schlawack
c5338ba26e
Refine reasons
2015-01-28 12:52:55 +01:00
Hynek Schlawack
da4c9ca514
Nobody intends to stop maintaining characteristic
2015-01-27 23:52:11 +01:00
Hynek Schlawack
ace17a99eb
Add some rationale about why forking characteristic
2015-01-27 23:39:24 +01:00
Hynek Schlawack
58d5c0a767
Get rid of <> in repr
...
Closes #1
2015-01-27 23:08:55 +01:00
Hynek Schlawack
5ce5e48074
Change attr.a to attr.ib
...
Closes #2
2015-01-27 23:03:42 +01:00
Hynek Schlawack
c7381fd0e2
Gut docs for now
2015-01-27 23:03:04 +01:00
Hynek Schlawack
9560908555
Initial commit
...
Docs aren't there yet
2015-01-27 17:53:17 +01:00