Commit Graph

22 Commits

Author SHA1 Message Date
Hynek Schlawack 7c85d68de2 Verify amount of arguments passed to Attribute 2015-01-30 13:26:44 +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 477f1782b6 Add tests for provides's repr 2015-01-29 19:41:58 +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 8bb430cf18 Add basic support for zope.interface 2015-01-29 19:04:23 +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 3e45f0559e Strip underscore for __init__
There is not such thing as private parameters.
2015-01-29 13:05:04 +01:00
Hynek Schlawack 692e4613a0 Add instance_of validator 2015-01-29 12:20:17 +01:00
Hynek Schlawack 774cf0142a Pass the Attribute object into validators
This allows for more generic validators.
2015-01-29 09:22:06 +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 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 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 9560908555 Initial commit
Docs aren't there yet
2015-01-27 17:53:17 +01:00