diff options
author | 2011-07-23 15:54:05 -0400 | |
---|---|---|
committer | 2011-07-23 15:54:05 -0400 | |
commit | c527c1d83987d1a01cab3903f8d588e093669fb6 (patch) | |
tree | 53f27dbb86bbcf735d607c91a6b4fcb8f0260d12 /github3/models.py | |
parent | get a user (diff) | |
download | python-github3-c527c1d83987d1a01cab3903f8d588e093669fb6.tar.xz python-github3-c527c1d83987d1a01cab3903f8d588e093669fb6.zip |
cleaner attar defines
Diffstat (limited to 'github3/models.py')
-rw-r--r-- | github3/models.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/github3/models.py b/github3/models.py index 38a2ea1..7b11031 100644 --- a/github3/models.py +++ b/github3/models.py @@ -11,10 +11,10 @@ from .helpers import to_python, to_api class BaseResource(object): """A BaseResource object.""" - _strings = [] + _strs = [] _ints = [] - _datetimes = [] - _booleans = [] + _dates = [] + _bools = [] _map = {} @@ -37,16 +37,19 @@ class BaseResource(object): def _bootstrap(self): """Bootstraps the model object based on configured values.""" - for attr in (self._strings + self._ints + self._datetimes + self._booleans + self._map.keys()): + for attr in (self._strs + self._ints + self._dates + self._bools + self._map.keys()): setattr(self, attr, None) + @classmethod def new_from_dict(cls, d, gh=None): return to_python( obj=cls(), in_dict=d, - string_keys = cls._strings, + str_keys = cls._strings, + int_keys = cls._ints, date_keys = cls._datetimes, + bool_keys = cls._booleans, _gh = gh ) |