Skip to content

Commit 97739b6

Browse files
committed
clean up properties.py
1 parent 3c7b647 commit 97739b6

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

couchdbkit/schema/properties.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
import functools
66
from jsonobject.properties import *
77
from jsonobject.base import DefaultProperty
8-
from jsonobject.convert import ALLOWED_PROPERTY_TYPES
8+
from jsonobject.convert import (
9+
ALLOWED_PROPERTY_TYPES,
10+
MAP_TYPES_PROPERTIES,
11+
value_to_python,
12+
value_to_property
13+
)
914

10-
SchemaProperty = ObjectProperty
11-
SchemaListProperty = ListProperty
1215
StringListProperty = functools.partial(ListProperty, unicode)
13-
SchemaDictProperty = DictProperty
1416

1517

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

3537

36-
dict_to_json = None
37-
list_to_json = None
38-
value_to_json = None
39-
value_to_python = None
40-
dict_to_python = None
41-
list_to_python = None
42-
convert_property = None
43-
value_to_property = None
38+
def _not_implemented(*args, **kwargs):
39+
raise NotImplementedError()
40+
41+
dict_to_json = _not_implemented
42+
list_to_json = _not_implemented
43+
value_to_json = _not_implemented
44+
dict_to_python = _not_implemented
45+
list_to_python = _not_implemented
46+
convert_property = _not_implemented
4447

4548
LazyDict = JsonDict
4649
LazyList = JsonArray

0 commit comments

Comments
 (0)