Skip to content

Commit

Permalink
:update: make middleware and DATA_ID private in Model class
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdd committed Jul 13, 2016
1 parent d164ffe commit 183857a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion link/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-

__version__ = '0.3'
__version__ = '0.4'

CONF_BASE_PATH = 'link/model'
6 changes: 3 additions & 3 deletions link/model/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ def __call__(self, schemaname):


class Model(object):
DATA_ID = 'id'
_DATA_ID = 'id'

def __init__(self, middleware, **kwargs):
super(Model, self).__init__()

self.middleware = middleware
self._middleware = middleware

for key in kwargs:
self[key] = kwargs[key]
Expand Down Expand Up @@ -93,7 +93,7 @@ def __str__(self):
return str(d)

def __repr__(self):
return 'Model(data_id={0})'.format(self[self.DATA_ID])
return 'Model(data_id={0})'.format(self[self._DATA_ID])

def save(self):
raise NotImplementedError()
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
b3j0f.conf==0.3.18
link.middleware==0.16
link.middleware==0.19
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
LICENSE = 'MIT'
REQUIREMENTS = [
'b3j0f.conf>=0.3.18',
'link.middleware>=0.16'
'link.middleware>=0.19'
]

CLASSIFIERS = [
Expand Down

0 comments on commit 183857a

Please sign in to comment.