add __repr__ on NotAvailable, NotLoaded and _NO_DEFAULT constants to be more readable on doc
This commit is contained in:
parent
a3c4c55fd6
commit
52899a7ca9
2 changed files with 11 additions and 1 deletions
|
|
@ -111,6 +111,9 @@ class NotAvailableType(object):
|
||||||
def __deepcopy__(self, memo):
|
def __deepcopy__(self, memo):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return 'NotAvailable'
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return u'Not available'
|
return u'Not available'
|
||||||
|
|
||||||
|
|
@ -137,6 +140,9 @@ class NotLoadedType(object):
|
||||||
def __deepcopy__(self, memo):
|
def __deepcopy__(self, memo):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return u'NotLoaded'
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return u'Not loaded'
|
return u'Not loaded'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,11 @@ from weboob.tools.compat import basestring
|
||||||
from weboob.tools.exceptions import ParseError
|
from weboob.tools.exceptions import ParseError
|
||||||
from weboob.tools.html import html2text
|
from weboob.tools.html import html2text
|
||||||
|
|
||||||
_NO_DEFAULT = object()
|
class NoDefault(object):
|
||||||
|
def __repr__(self):
|
||||||
|
return 'NO_DEFAULT'
|
||||||
|
|
||||||
|
_NO_DEFAULT = NoDefault()
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['FilterError', 'ColumnNotFound', 'RegexpError', 'ItemNotFound',
|
__all__ = ['FilterError', 'ColumnNotFound', 'RegexpError', 'ItemNotFound',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue