add changelog entry. formatings

pull/183/head
Johannes Raggam 2016-02-05 12:47:34 +01:00
rodzic 63fcf7436e
commit 4a5244ce72
2 zmienionych plików z 10 dodań i 8 usunięć

Wyświetl plik

@ -13,11 +13,15 @@ Fixes:
- Fixed possible IndexError exception during parsing of an ical string.
[stlaz]
- Fixed date-time being recognized as date or time during parsing. Added
better error handling to parsing from ical strings.
- When doing a boolean test on ``icalendar.cal.Component``, always return ``True``.
Before it was returning ``False`` due to CaselessDict, if it didn't contain any items.
[stlaz]
- Added __version__ attribute to init.py
- Fixed date-time being recognized as date or time during parsing.
Added better error handling to parsing from ical strings.
[stlaz]
- Added __version__ attribute to init.py.
[TomTry]
- Documentation fixes.

Wyświetl plik

@ -94,8 +94,7 @@ class Component(CaselessDict):
# return name in not_compliant
def __bool__(self):
"""
Returns True, CaselessDict would return False if it had no items
"""Returns True, CaselessDict would return False if it had no items.
"""
return True
@ -103,10 +102,9 @@ class Component(CaselessDict):
__nonzero__ = __bool__
def is_empty(self):
"""Returns True if Component has no items or subcomponents, else False.
"""
Returns True if Component has no items or subcomponents, else False
"""
return True if not (list(self.values()) + self.subcomponents) else False
return True if not (list(self.values()) + self.subcomponents) else False # noqa
#############################
# handling of property values