Commit Graph

18 Commits

Author SHA1 Message Date
Hynek Schlawack a372d51b7b
Fade to Black (#392) 2018-06-10 19:40:07 +02:00
Zac Hatfield-Dodds a3dbdfc687 Improve error for in_(a_string) with a non-string value (#383)
* Improve error for in_(a_string) with a non-string value

* Tighten exception handling and test description

* Improve changelog for Hynek

* Final changelog edit
2018-05-25 10:32:13 +02:00
Hynek Schlawack 90fe45de6f isort update 2018-02-05 09:03:00 +01:00
Hynek Schlawack ef9a062022
Use isort so we can stop thinking about imports (#297) 2017-11-26 22:18:07 +01:00
Hynek Schlawack 03c10ad0ef Use new serious biz names in internal code (#257)
* Use new serious biz names

* Use offical API in tests where possible

* Fix flake8
2017-10-02 19:32:10 +02:00
Tin Tvrtković 82ea73cb47 Compatibility fixes. (#193)
* Restore hash to validators.

* Restore Attribute.default and Attribute.validator.

* _AndValidator is hashable now. Test validator hashability.

* Add in_ to validators.__all__.
2017-05-19 11:31:00 -07:00
Andre Dieb 461e1b2aab [RFC] Enhancement/one of validator (#181) 2017-05-16 10:36:42 +02:00
Hynek Schlawack fbe0bd5967 Make optional support lists of validators (#186) 2017-05-12 23:02:07 +02:00
Hynek Schlawack b337f5b9d5 Move test helpers into an utils module
__init__.py should never contain any code.
2016-08-15 15:27:13 +02:00
Hynek Schlawack 3051fbfcd3 Minor fixes 2015-07-26 12:32:02 +02:00
Samuel A. Falvo II 765a97466d Review feedback 2015-07-26 11:29:54 +02:00
Samuel A. Falvo II 0abd302cb2 Support optional values through a new validator.
Unfortunately, I'm unable to run tests locally b/c of severe dependency
hell.  I am unable to get tox, detox, python setup.py test, and other
means of running tests to work at all.  So, since I'm blocked on a
project by the lack of optional validator support, I am going to close
my eyes, look away, and pull the trigger, and hope I hit the target.

If someone who has a working Python configuration can please be kind
enough to let me know if my changes fail any tests, I'd be very
appreciative.

Even better, I'd love to know why a stock Python distribution with
dependencies installed is incapable of running the tests for attrs.
However, this isn't the right forum to answer that question.

(This PR has the 17+ debugging commits cleaned up.)
2015-07-26 11:29:53 +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 477f1782b6 Add tests for provides's repr 2015-01-29 19:41:58 +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 692e4613a0 Add instance_of validator 2015-01-29 12:20:17 +01:00