hynek / characteristic

Please use attrs instead!
https://attrs.readthedocs.io/
MIT License
84 stars 19 forks source link

Don't allow additional kwargs to attributes. #18

Closed Julian closed 10 years ago

Julian commented 10 years ago

Prevent attributes() from silently swallowing any kwargs it doesn't understand.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 2b1aa82d0dbe2b1b3a823beeb93281f2f82da327 on Julian:master into 79a5cab94e4a9e8bb5d56cf9a95cb02569d79ed3 on hynek:master.

hynek commented 10 years ago

The changes make sense, the build is failing though: https://travis-ci.org/hynek/characteristic/jobs/34248947

Julian commented 10 years ago

Both fixed.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling de1ddd6af68fe9afa0cbfca27b09cd891163206b on Julian:master into 79a5cab94e4a9e8bb5d56cf9a95cb02569d79ed3 on hynek:master.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling de1ddd6af68fe9afa0cbfca27b09cd891163206b on Julian:master into 79a5cab94e4a9e8bb5d56cf9a95cb02569d79ed3 on hynek:master.

hynek commented 10 years ago

Thanks and sorry I didn’t get back sooner to you!

Would you mind explaining why you went for TypeError? I kind of feel like it’s a RuntimeError…

Julian commented 10 years ago

It's what you get for stuff that doesn't take **kwargs if you provide a kwarg that the callable doesn't know about (and the message matches what's emulated here). On Sep 8, 2014 4:54 AM, "Hynek Schlawack" notifications@github.com wrote:

Thanks and sorry I didn’t get back sooner to you!

Would you mind explaining why you went for TypeError? I kind of feel like it’s a RuntimeError…

— Reply to this email directly or view it on GitHub https://github.com/hynek/characteristic/pull/18#issuecomment-54791633.

hynek commented 10 years ago

Ah, wonderful thanks!