johnnoone / json-spec

Implements some tools for JSON
BSD 3-Clause "New" or "Revised" License
38 stars 21 forks source link

use collections MutableMapping and MutableSequence in type checks #15

Closed misja closed 8 years ago

misja commented 8 years ago

Operations were failing since I was using my own types. This pull checks for collections.MutableMapping and collections.MutableSequence instead of concrete types dict, list, tuple.

johnnoone commented 8 years ago

the PR is pretty cool. I would suggest some improvements. Mapping in place of MutableMapping should be fine most of the time. tuple will not work because they are not mutable. Maybe you should test against Sequence and excluding str.

misja commented 8 years ago

Have a look, think type checks should be ok now. And Travis stumbles over pytest versions?

johnnoone commented 8 years ago

Sometime Travis is a real mystery... Anyway the PR it seems good to me. Next release will be published soon to pypi. Thanks!