Skip to content

Commit

Permalink
clean up properties.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyroberts committed Aug 28, 2013
1 parent 3c7b647 commit 97739b6
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions couchdbkit/schema/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
import functools
from jsonobject.properties import *
from jsonobject.base import DefaultProperty
from jsonobject.convert import ALLOWED_PROPERTY_TYPES
from jsonobject.convert import (
ALLOWED_PROPERTY_TYPES,
MAP_TYPES_PROPERTIES,
value_to_python,
value_to_property
)

SchemaProperty = ObjectProperty
SchemaListProperty = ListProperty
StringListProperty = functools.partial(ListProperty, unicode)
SchemaDictProperty = DictProperty


class Property(DefaultProperty):
Expand All @@ -33,14 +35,15 @@ def to_json(self, value):
raise NotImplementedError()


dict_to_json = None
list_to_json = None
value_to_json = None
value_to_python = None
dict_to_python = None
list_to_python = None
convert_property = None
value_to_property = None
def _not_implemented(*args, **kwargs):
raise NotImplementedError()

dict_to_json = _not_implemented
list_to_json = _not_implemented
value_to_json = _not_implemented
dict_to_python = _not_implemented
list_to_python = _not_implemented
convert_property = _not_implemented

LazyDict = JsonDict
LazyList = JsonArray
Expand Down

0 comments on commit 97739b6

Please sign in to comment.