Eolian: Formatting and repr function fixes

This commit is contained in:
Kai Huuhko 2014-09-16 13:56:47 +03:00
parent 3324f92276
commit edc2be0113
1 changed files with 12 additions and 19 deletions

View File

@ -429,7 +429,7 @@ def show_enum(name):
If @c name is NULL, this function will print information of
all the enums.
@param[in] name the enum to show.
:param name: the enum to show.
:return: True on success, False otherwise (when enum is not
found).
@ -456,7 +456,7 @@ def show_global(name):
If @c name is NULL, this function will print information of
all the globals.
@param[in] name the global to show.
:param name: the global to show.
:return: True on success, False otherwise (when global is not
found).
@ -483,7 +483,7 @@ def show_constant(name):
If @c name is NULL, this function will print information of
all the constants.
@param[in] name the constant to show.
:param name: the constant to show.
:return: True on success, False otherwise (when constant is not
found).
@ -647,10 +647,10 @@ cdef class Class(object):
def __repr__(self):
return (
"<%s (full_name=%s, filename=%s, type=%s, inherits=%r, "
"<%s (full_name=%s, filename=%s, type=%s, inherits=%s, "
"description=%s)>" % (
self.name, self.full_name, self.filename,
self.type, self.inherits_list,
self.type, list(self.inherits),
self.description.replace('\n', ' ') if self.description else \
None
))
@ -822,7 +822,7 @@ cdef class Class(object):
"""
def __get__(self):
cdef EinaIterator ret = EinaIterator(unicode)
cdef EinaIterator ret = EinaIterator(Function)
ret._set_obj(eolian_class_implements_get(self.klass))
return ret
@ -834,7 +834,7 @@ cdef class Class(object):
"""
def __get__(self):
cdef EinaIterator ret = EinaIterator(unicode)
cdef EinaIterator ret = EinaIterator(Constructor)
ret._set_obj(eolian_class_constructors_get(self.klass))
return ret
@ -1240,12 +1240,9 @@ cdef class Implement(object):
pass
def __repr__(self):
info = self.information
if not info:
info = (None, None, None)
return (
"<%s (class=%r, function=%r, type=%r)>" % (
self.full_name, info[0], info[1], info[2],
self.full_name, self.klass, self.function, self.type,
))
property full_name:
@ -1375,14 +1372,10 @@ cdef class Event(object):
pass
def __repr__(self):
info = self.information
if info:
return (
"<%s (type=%s, description=%s)>" % (
info[0], info[1], info[2]
))
else:
return "<Event>"
return (
"<%s (type=%s, description=%s)>" % (
self.name, self.type, self.description
))
property name:
"""Get the name of an event.