[CalendarServer-changes] [13800] PyCalendar/trunk/src
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jul 29 07:53:07 PDT 2014
Revision: 13800
http://trac.calendarserver.org//changeset/13800
Author: cdaboo at apple.com
Date: 2014-07-29 07:53:07 -0700 (Tue, 29 Jul 2014)
Log Message:
-----------
White space.
Modified Paths:
--------------
PyCalendar/trunk/src/pycalendar/datetime.py
PyCalendar/trunk/src/pycalendar/datetimevalue.py
PyCalendar/trunk/src/pycalendar/duration.py
PyCalendar/trunk/src/pycalendar/icalendar/calendar.py
PyCalendar/trunk/src/pycalendar/icalendar/component.py
PyCalendar/trunk/src/pycalendar/icalendar/componentexpanded.py
PyCalendar/trunk/src/pycalendar/icalendar/componentrecur.py
PyCalendar/trunk/src/pycalendar/icalendar/property.py
PyCalendar/trunk/src/pycalendar/icalendar/recurrence.py
PyCalendar/trunk/src/pycalendar/icalendar/recurrenceset.py
PyCalendar/trunk/src/pycalendar/icalendar/tests/test_calendar.py
PyCalendar/trunk/src/pycalendar/icalendar/tests/test_componentrecur.py
PyCalendar/trunk/src/pycalendar/icalendar/tests/test_i18n.py
PyCalendar/trunk/src/pycalendar/icalendar/tests/test_json.py
PyCalendar/trunk/src/pycalendar/icalendar/tests/test_timezone.py
PyCalendar/trunk/src/pycalendar/icalendar/tests/test_vpoll.py
PyCalendar/trunk/src/pycalendar/icalendar/tests/test_xml.py
PyCalendar/trunk/src/pycalendar/icalendar/valarm.py
PyCalendar/trunk/src/pycalendar/outputfilter.py
PyCalendar/trunk/src/pycalendar/period.py
PyCalendar/trunk/src/pycalendar/tests/utils.py
PyCalendar/trunk/src/pycalendar/vcard/tests/test_card.py
PyCalendar/trunk/src/zonal/tzconvert.py
PyCalendar/trunk/src/zonal/tzverify.py
Modified: PyCalendar/trunk/src/pycalendar/datetime.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/datetime.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/datetime.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -611,8 +611,10 @@
if (self.mMonth < 1) or (self.mMonth > 12):
return ""
else:
- return locale.getMonth(self.mMonth,
- [locale.SHORT, locale.LONG][not short_txt])
+ return locale.getMonth(
+ self.mMonth,
+ [locale.SHORT, locale.LONG][not short_txt]
+ )
def getDayOfWeekText(self, day):
@@ -1128,7 +1130,8 @@
xmlutils.makeTag(
namespace,
xmldefinitions.value_date if self.isDateOnly() else xmldefinitions.value_date_time
- ))
+ )
+ )
value.text = self.getXMLText()
Modified: PyCalendar/trunk/src/pycalendar/datetimevalue.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/datetimevalue.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/datetimevalue.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -25,7 +25,7 @@
_wrappedType = None # Depends on actual value
def getType(self):
- return (Value.VALUETYPE_DATETIME, Value.VALUETYPE_DATE)[self.mValue.isDateOnly()]
+ return (Value.VALUETYPE_DATETIME, Value.VALUETYPE_DATE)[self.mValue.isDateOnly()]
def parse(self, data, variant):
Modified: PyCalendar/trunk/src/pycalendar/duration.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/duration.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/duration.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -67,7 +67,7 @@
def getTotalSeconds(self):
return [1, -1][not self.mForward] \
- * (self.mSeconds + (self.mMinutes + (self.mHours + (self.mDays + (self.mWeeks * 7)) * 24) * 60) * 60)
+ * (self.mSeconds + (self.mMinutes + (self.mHours + (self.mDays + (self.mWeeks * 7)) * 24) * 60) * 60)
def setDuration(self, seconds):
Modified: PyCalendar/trunk/src/pycalendar/icalendar/calendar.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/calendar.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/calendar.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -424,8 +424,10 @@
if only_due:
if vtodo.getStatus() == definitions.eStatus_VToDo_Cancelled:
continue
- elif ((vtodo.getStatus() == definitions.eStatus_VToDo_Completed) and
- (not vtodo.hasCompleted() or (vtodo.getCompleted() < minusoneday))):
+ elif (
+ (vtodo.getStatus() == definitions.eStatus_VToDo_Completed) and
+ (not vtodo.hasCompleted() or (vtodo.getCompleted() < minusoneday))
+ ):
continue
# Filter out those with end after chosen date if required
@@ -436,7 +438,7 @@
continue
# TODO: fix this
- #list.append(ComponentExpandedShared(ComponentExpanded(vtodo, None)))
+ # list.append(ComponentExpandedShared(ComponentExpanded(vtodo, None)))
def getRecurrenceInstancesItems(self, type, uid, items):
@@ -459,7 +461,7 @@
def getVFreeBusyFB(self, period, fb):
# First create expanded set
# TODO: fix this
- #list = ExpandedComponents()
+ # list = ExpandedComponents()
self.getVEvents(period, list)
if len(list) == 0:
return
@@ -605,7 +607,7 @@
indicates what set of timezones should be automatically included. If set to L{None} the default
is L{Calendar.NO_TIMEZONES}. Otherwise, one of L{Calendar.ALL_TIMEZONES}, L{Calendar.NONSTD_TIMEZONES},
or L{Calendar.NO_TIMEZONES} must be used.
-
+
@param includeTimezones: indicated whether all, only non-standard or no timezones are included
@type includeTimezones: L{int} or L{None}
"""
@@ -641,7 +643,7 @@
"""
Remove VTIMEZONE components from this L{Calendar} if the corresponding TZIDs are
in the timezone database.
-
+
@return: L{True} if changes were made, L{False} otherwise
@rtype: L{bool}
"""
Modified: PyCalendar/trunk/src/pycalendar/icalendar/component.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/component.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/component.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -164,16 +164,14 @@
def initDTSTAMP(self):
self.removeProperties(definitions.cICalProperty_DTSTAMP)
- prop = Property(definitions.cICalProperty_DTSTAMP,
- DateTime.getNowUTC())
+ prop = Property(definitions.cICalProperty_DTSTAMP, DateTime.getNowUTC())
self.addProperty(prop)
def updateLastModified(self):
self.removeProperties(definitions.cICalProperty_LAST_MODIFIED)
- prop = Property(definitions.cICalProperty_LAST_MODIFIED,
- DateTime.getNowUTC())
+ prop = Property(definitions.cICalProperty_LAST_MODIFIED, DateTime.getNowUTC())
self.addProperty(prop)
Modified: PyCalendar/trunk/src/pycalendar/icalendar/componentexpanded.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/componentexpanded.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/componentexpanded.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -41,8 +41,10 @@
@staticmethod
def sort_by_dtstart(e1, e2):
if e1.mInstanceStart == e2.mInstanceStart:
- if (e1.mInstanceStart.isDateOnly() and not e2.mInstanceStart.isDateOnly() or
- not e1.mInstanceStart.isDateOnly() and e2.mInstanceStart.isDateOnly()):
+ if (
+ e1.mInstanceStart.isDateOnly() and not e2.mInstanceStart.isDateOnly() or
+ not e1.mInstanceStart.isDateOnly() and e2.mInstanceStart.isDateOnly()
+ ):
return e1.mInstanceStart.isDateOnly()
else:
return False
Modified: PyCalendar/trunk/src/pycalendar/icalendar/componentrecur.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/componentrecur.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/componentrecur.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -64,8 +64,10 @@
@staticmethod
def sort_by_dtstart(e1, e2):
if e1.self.mStart == e2.self.mStart:
- if (e1.self.mStart.isDateOnly() and e2.self.mStart.isDateOnly() or
- not e1.self.mStart.isDateOnly() and not e2.self.mStart.isDateOnly()):
+ if (
+ e1.self.mStart.isDateOnly() and e2.self.mStart.isDateOnly() or
+ not e1.self.mStart.isDateOnly() and not e2.self.mStart.isDateOnly()
+ ):
return False
else:
return e1.self.mStart.isDateOnly()
@@ -380,10 +382,12 @@
def _resetRecurrenceSet(self):
# May need to create items
self.mRecurrences = None
- if ((self.countProperty(definitions.cICalProperty_RRULE) != 0) or
+ if (
+ (self.countProperty(definitions.cICalProperty_RRULE) != 0) or
(self.countProperty(definitions.cICalProperty_RDATE) != 0) or
(self.countProperty(definitions.cICalProperty_EXRULE) != 0) or
- (self.countProperty(definitions.cICalProperty_EXDATE) != 0)):
+ (self.countProperty(definitions.cICalProperty_EXDATE) != 0)
+ ):
self.mRecurrences = RecurrenceSet()
@@ -678,7 +682,7 @@
for iter in self.mRecurrences.getRules():
prop = Property(definitions.cICalProperty_RRULE, iter)
self.addProperty(prop)
- for iter in self.mRecurrences.getDates():
+ for iter in self.mRecurrences.getDates():
prop = Property(definitions.cICalProperty_RDATE, iter)
self.addProperty(prop)
@@ -699,8 +703,10 @@
# If this component does not have its own end/duration property,
# the determine
# the end from the master duration
- if (not self.hasProperty(definitions.cICalProperty_DTEND) and
- not self.hasProperty(definitions.cICalProperty_DURATION)):
+ if (
+ not self.hasProperty(definitions.cICalProperty_DTEND) and
+ not self.hasProperty(definitions.cICalProperty_DURATION)
+ ):
# End is based on original events settings
self.mEnd = self.mStart + (self.mMaster.getEnd() - self.mMaster.getStart())
Modified: PyCalendar/trunk/src/pycalendar/icalendar/property.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/property.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/property.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -297,7 +297,7 @@
if definitions.cICalParameter_TZID in self.mParameters:
del self.mParameters[definitions.cICalParameter_TZID]
self.mParameters.setdefault(definitions.cICalParameter_TZID, []).append(
- Parameter(name=definitions.cICalParameter_TZID, value=dt.getTimezoneID()))
+ Parameter(name=definitions.cICalParameter_TZID, value=dt.getTimezoneID()))
def _init_attr_value_datetimelist(self, dtl):
@@ -321,7 +321,7 @@
if definitions.cICalParameter_TZID in self.mParameters:
del self.mParameters[definitions.cICalParameter_TZID]
self.mParameters.setdefault(definitions.cICalParameter_TZID, []).append(
- Parameter(name=definitions.cICalParameter_TZID, value=dtl[0].getTimezoneID()))
+ Parameter(name=definitions.cICalParameter_TZID, value=dtl[0].getTimezoneID()))
def _init_attr_value_periodlist(self, periodlist):
Modified: PyCalendar/trunk/src/pycalendar/icalendar/recurrence.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/recurrence.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/recurrence.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -204,20 +204,22 @@
def equals(self, comp):
- return (self.mFreq == comp.mFreq) \
- and (self.mUseCount == comp.mUseCount) and (self.mCount == comp.mCount) \
- and (self.mUseUntil == comp.mUseUntil) and (self.mUntil == comp.mUntil) \
- and (self.mInterval == comp.mInterval) \
- and self.equalsNum(self.mBySeconds, comp.mBySeconds) \
- and self.equalsNum(self.mByMinutes, comp.mByMinutes) \
- and self.equalsNum(self.mByHours, comp.mByHours) \
- and self.equalsDayNum(self.mByDay, comp.mByDay) \
- and self.equalsNum(self.mByMonthDay, comp.mByMonthDay) \
- and self.equalsNum(self.mByYearDay, comp.mByYearDay) \
- and self.equalsNum(self.mByWeekNo, comp.mByWeekNo) \
- and self.equalsNum(self.mByMonth, comp.mByMonth) \
- and self.equalsNum(self.mBySetPos, comp.mBySetPos) \
- and (self.mWeekstart == comp.mWeekstart)
+ return (
+ (self.mFreq == comp.mFreq)
+ and (self.mUseCount == comp.mUseCount) and (self.mCount == comp.mCount)
+ and (self.mUseUntil == comp.mUseUntil) and (self.mUntil == comp.mUntil)
+ and (self.mInterval == comp.mInterval)
+ and self.equalsNum(self.mBySeconds, comp.mBySeconds)
+ and self.equalsNum(self.mByMinutes, comp.mByMinutes)
+ and self.equalsNum(self.mByHours, comp.mByHours)
+ and self.equalsDayNum(self.mByDay, comp.mByDay)
+ and self.equalsNum(self.mByMonthDay, comp.mByMonthDay)
+ and self.equalsNum(self.mByYearDay, comp.mByYearDay)
+ and self.equalsNum(self.mByWeekNo, comp.mByWeekNo)
+ and self.equalsNum(self.mByMonth, comp.mByMonth)
+ and self.equalsNum(self.mBySetPos, comp.mBySetPos)
+ and (self.mWeekstart == comp.mWeekstart)
+ )
def equalsNum(self, items1, items2):
@@ -500,7 +502,7 @@
avalue = abs(value)
if min is not None and avalue < min:
raise ValueError(errmsg)
- if max is not None and avalue > max:
+ if max is not None and avalue > max:
raise ValueError(errmsg)
list.append(value)
@@ -794,15 +796,17 @@
def hasBy(self):
- return (self.mBySeconds is not None) and (len(self.mBySeconds) != 0) \
- or (self.mByMinutes is not None) and (len(self.mByMinutes) != 0) \
- or (self.mByHours is not None) and (len(self.mByHours) != 0) \
- or (self.mByDay is not None) and (len(self.mByDay) != 0) \
- or (self.mByMonthDay is not None) and (len(self.mByMonthDay) != 0) \
- or (self.mByYearDay is not None) and (len(self.mByYearDay) != 0) \
- or (self.mByWeekNo is not None) and (len(self.mByWeekNo) != 0) \
- or (self.mByMonth is not None) and (len(self.mByMonth) != 0) \
- or (self.mBySetPos is not None) and (len(self.mBySetPos) != 0)
+ return (
+ (self.mBySeconds is not None) and (len(self.mBySeconds) != 0)
+ or (self.mByMinutes is not None) and (len(self.mByMinutes) != 0)
+ or (self.mByHours is not None) and (len(self.mByHours) != 0)
+ or (self.mByDay is not None) and (len(self.mByDay) != 0)
+ or (self.mByMonthDay is not None) and (len(self.mByMonthDay) != 0)
+ or (self.mByYearDay is not None) and (len(self.mByYearDay) != 0)
+ or (self.mByWeekNo is not None) and (len(self.mByWeekNo) != 0)
+ or (self.mByMonth is not None) and (len(self.mByMonth) != 0)
+ or (self.mBySetPos is not None) and (len(self.mBySetPos) != 0)
+ )
def isSimpleRule(self):
@@ -819,11 +823,13 @@
# no others
# First checks the ones we do not handle at all
- if ((self.mBySeconds is not None) and (len(self.mBySeconds) != 0) \
- or (self.mByMinutes is not None) and (len(self.mByMinutes) != 0) \
- or (self.mByHours is not None) and (len(self.mByHours) != 0) \
- or (self.mByYearDay is not None) and (len(self.mByYearDay) != 0) \
- or (self.mByWeekNo is not None) and (len(self.mByWeekNo) != 0)):
+ if (
+ (self.mBySeconds is not None) and (len(self.mBySeconds) != 0)
+ or (self.mByMinutes is not None) and (len(self.mByMinutes) != 0)
+ or (self.mByHours is not None) and (len(self.mByHours) != 0)
+ or (self.mByYearDay is not None) and (len(self.mByYearDay) != 0)
+ or (self.mByWeekNo is not None) and (len(self.mByWeekNo) != 0)
+ ):
return False
# Check BYMONTHDAY numbers (we can handle -7...-1, 1..31)
@@ -1005,7 +1011,7 @@
set_items = filter(lambda x: not x.invalid(), set_items)
# Always sort the set as BYxxx rules may not be sorted
- #set_items.sort(cmp=DateTime.sort)
+ # set_items.sort(cmp=DateTime.sort)
set_items.sort(key=lambda x: x.getPosixTime())
# Process each one in the generated set
@@ -1471,7 +1477,7 @@
output.append(temp)
else:
# Every matching day in the year
- for i in range(1, 54):
+ for i in range(1, 54):
temp = iter1.duplicate()
temp.setDayOfWeekInYear(i, iter2[1])
if temp.getYear() == (iter1).getYear():
@@ -1699,7 +1705,7 @@
def bySetPosLimit(self, dates):
# The input dates MUST be sorted in order for this to work properly
- #dates.sort(cmp=DateTime.sort)
+ # dates.sort(cmp=DateTime.sort)
dates.sort(key=lambda x: x.getPosixTime())
# Loop over each BYSETPOS and extract the relevant component from the
Modified: PyCalendar/trunk/src/pycalendar/icalendar/recurrenceset.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/recurrenceset.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/recurrenceset.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -39,9 +39,11 @@
def hasRecurrence(self):
- return ((len(self.mRrules) != 0) or (len(self.mRdates) != 0) or (len(self.mRperiods) != 0)
- or (len(self.mExrules) != 0) or (len(self.mExdates) != 0)
- or (len(self.mExperiods) != 0))
+ return (
+ (len(self.mRrules) != 0) or (len(self.mRdates) != 0) or (len(self.mRperiods) != 0)
+ or (len(self.mExrules) != 0) or (len(self.mExdates) != 0)
+ or (len(self.mExperiods) != 0)
+ )
def equals(self, comp):
Modified: PyCalendar/trunk/src/pycalendar/icalendar/tests/test_calendar.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/tests/test_calendar.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/tests/test_calendar.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -27,7 +27,7 @@
class TestCalendar(unittest.TestCase):
data = (
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -42,7 +42,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -80,7 +80,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
BEGIN:VEVENT
@@ -94,7 +94,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -109,7 +109,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -124,7 +124,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Example Inc.//Example Calendar//EN
@@ -172,7 +172,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Example Inc.//Example Calendar//EN
@@ -185,7 +185,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -203,7 +203,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iCal 4.0.1//EN
@@ -243,7 +243,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -260,7 +260,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -277,10 +277,10 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-)
+ )
data2 = (
- (
-"""BEGIN:VCALENDAR
+ (
+ """BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
BEGIN:VEVENT
@@ -295,7 +295,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
X-TEST:Testing
@@ -309,8 +309,8 @@
END:VEVENT
END:VCALENDAR
""".replace("\n", "\r\n"),
- ),
-)
+ ),
+ )
def testRoundtrip(self):
@@ -467,7 +467,7 @@
def testParseFail(self):
data = (
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -481,13 +481,13 @@
END:VEVENT
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
VERSION:2.0
END:VCARD
""".replace("\n", "\r\n"),
-"""BOGUS
+ """BOGUS
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
@@ -503,7 +503,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BOGUS
+ """BOGUS
BEGIN:VCALENDAR
VERSION:2.0
@@ -520,7 +520,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -536,7 +536,7 @@
BOGUS
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -562,7 +562,7 @@
def testParseBlank(self):
data = (
-"""
+ """
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
@@ -578,7 +578,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""
+ """
BEGIN:VCALENDAR
VERSION:2.0
@@ -595,7 +595,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -612,7 +612,7 @@
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -628,7 +628,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
Modified: PyCalendar/trunk/src/pycalendar/icalendar/tests/test_componentrecur.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/tests/test_componentrecur.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/tests/test_componentrecur.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -22,7 +22,7 @@
def testDuplicateWithRecurrenceChange(self):
data = (
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -36,7 +36,7 @@
END:VEVENT
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -50,7 +50,7 @@
END:VEVENT
END:VCALENDAR
""".replace("\n", "\r\n"),
-)
+ )
cal1 = Calendar()
cal1.parse(StringIO.StringIO(data[0]))
Modified: PyCalendar/trunk/src/pycalendar/icalendar/tests/test_i18n.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/tests/test_i18n.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/tests/test_i18n.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -25,7 +25,7 @@
def testAddCN(self):
data = (
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -41,9 +41,9 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
- "まだ",
+ "まだ",
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
Modified: PyCalendar/trunk/src/pycalendar/icalendar/tests/test_json.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/tests/test_json.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/tests/test_json.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -22,8 +22,8 @@
class TestJSON(unittest.TestCase):
data = (
- (
-"""BEGIN:VCALENDAR
+ (
+ """BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//Example Inc.//Example Calendar//EN
VERSION:2.0
@@ -36,7 +36,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""[
+ """[
"vcalendar",
[
[
@@ -91,9 +91,9 @@
]
]
]""",
- ),
- (
-"""BEGIN:VCALENDAR
+ ),
+ (
+ """BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Corp.//Example Client//EN
BEGIN:VTIMEZONE
@@ -139,7 +139,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""[
+ """[
"vcalendar",
[
[
@@ -384,8 +384,8 @@
]
]
]""",
- ),
- )
+ ),
+ )
def testGenerateJSON(self):
@@ -645,7 +645,7 @@
["sequence", {}, "integer", 1],
["rdate", {}, "date-time", "2006-02-26T12:00:00Z", "2006-02-27T12:00:00Z"],
["freebusy", {}, "period", ["2006-02-26T12:00:00Z", "2006-02-27T12:00:00Z"]],
- ["rrule", {}, "recur", {"freq":"MONTHLY", "count": 3, "byday":["TU", "WE", "TH"], "bysetpos":[-1]}],
+ ["rrule", {}, "recur", {"freq": "MONTHLY", "count": 3, "byday": ["TU", "WE", "TH"], "bysetpos": [-1]}],
["request-status", {}, "text", ["2.0", "Success"]],
["geo", {}, "float", [-2.1, 3.2]],
["uri", {}, "uri", "http://www.example.com"],
@@ -654,7 +654,7 @@
["x-foo", {}, "float", -1.23],
["x-test", {}, "text", "Some:, text."],
["x-apple-structured-location", {}, "uri", "geo:123.123,123.123"],
- ["rrule", {}, "recur", {"freq":"MONTHLY", "until": "2013-01-01T00:00:00Z"}],
+ ["rrule", {}, "recur", {"freq": "MONTHLY", "until": "2013-01-01T00:00:00Z"}],
["categories", {}, "text", "A", "B"],
# Various parameters
Modified: PyCalendar/trunk/src/pycalendar/icalendar/tests/test_timezone.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/tests/test_timezone.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/tests/test_timezone.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -24,7 +24,8 @@
def testOffsets(self):
data = (
- ("""BEGIN:VCALENDAR
+ (
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//calendarserver.org//Zonal//EN
@@ -204,7 +205,8 @@
(DateTime(2014, 11, 2, 8, 0, 0), True, -5),
)
),
- ("""BEGIN:VCALENDAR
+ (
+ """BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//calendarserver.org//Zonal//EN
VERSION:2.0
Modified: PyCalendar/trunk/src/pycalendar/icalendar/tests/test_vpoll.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/tests/test_vpoll.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/tests/test_vpoll.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -22,7 +22,7 @@
class TestCalendar(unittest.TestCase):
data = (
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
@@ -54,7 +54,7 @@
END:VCALENDAR
""",
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REPLY
@@ -72,7 +72,7 @@
END:VCALENDAR
""",
-)
+ )
def testRoundtrip(self):
Modified: PyCalendar/trunk/src/pycalendar/icalendar/tests/test_xml.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/tests/test_xml.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/tests/test_xml.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -22,8 +22,8 @@
class TestXML(unittest.TestCase):
data = (
- (
-"""BEGIN:VCALENDAR
+ (
+ """BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
BEGIN:VEVENT
@@ -38,7 +38,7 @@
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""<?xml version="1.0" encoding="utf-8"?>
+ """<?xml version="1.0" encoding="utf-8"?>
<ns0:icalendar xmlns:ns0="urn:ietf:params:xml:ns:icalendar-2.0">
<ns0:vcalendar>
<ns0:properties>
@@ -81,8 +81,8 @@
</ns0:vcalendar>
</ns0:icalendar>
""",
- ),
-)
+ ),
+ )
def testGenerateXML(self):
Modified: PyCalendar/trunk/src/pycalendar/icalendar/valarm.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/icalendar/valarm.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/icalendar/valarm.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -583,9 +583,13 @@
# Add new (with parameter)
prop = Property(definitions.cICalProperty_TRIGGER, duration)
- attr = Parameter(definitions.cICalParameter_RELATED,
- (definitions.cICalParameter_RELATED_START,
- definitions.cICalParameter_RELATED_END)[not trigger_start])
+ attr = Parameter(
+ definitions.cICalParameter_RELATED,
+ (
+ definitions.cICalParameter_RELATED_START,
+ definitions.cICalParameter_RELATED_END
+ )[not trigger_start]
+ )
prop.addParameter(attr)
self.addProperty(prop)
Modified: PyCalendar/trunk/src/pycalendar/outputfilter.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/outputfilter.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/outputfilter.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -53,7 +53,7 @@
# Test to see if sub-component type can be written out
def testSubComponent(self, oftype):
return self.mAllSubComponents or (self.mSubComponents is not None) \
- and oftype in self.mSubComponents
+ and oftype in self.mSubComponents
def hasSubComponentFilters(self):
Modified: PyCalendar/trunk/src/pycalendar/period.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/period.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/period.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -68,7 +68,7 @@
def __lt__(self, comp):
return self.mStart < comp.mStart \
- or (self.mStart == comp.mStart) and self.mEnd < comp.mEnd
+ or (self.mStart == comp.mStart) and self.mEnd < comp.mEnd
@classmethod
Modified: PyCalendar/trunk/src/pycalendar/tests/utils.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/tests/utils.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/tests/utils.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -25,5 +25,6 @@
def setUp(self):
TimezoneDatabase.createTimezoneDatabase(None)
+
def tearDown(self):
TimezoneDatabase.clearTimezoneDatabase()
Modified: PyCalendar/trunk/src/pycalendar/vcard/tests/test_card.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/vcard/tests/test_card.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/pycalendar/vcard/tests/test_card.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -26,7 +26,7 @@
data = (
(
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
N:Thompson;Default;;;
FN:Default Thompson
@@ -38,7 +38,7 @@
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
END:VCARD
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;U
@@ -53,7 +53,7 @@
""".replace("\n", "\r\n"),
),
(
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
N:Thompson;Default;;;
FN:Default Thompson
@@ -67,7 +67,7 @@
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
END:VCARD
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;U
@@ -84,7 +84,7 @@
""".replace("\n", "\r\n"),
),
(
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
N:Thompson;Default;;;
FN:Default Thompson
@@ -98,7 +98,7 @@
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
END:VCARD
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;U
@@ -115,7 +115,7 @@
""".replace("\n", "\r\n"),
),
(
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
N:Picture;With;;;
FN:With Picture
@@ -134,7 +134,7 @@
UID:934731C6-1C95-4C40-BE1F-FA4215B2307B:ABPerson
END:VCARD
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
UID:934731C6-1C95-4C40-BE1F-FA4215B2307B:ABPerson
item1.ADR;type=WORK;type=pref:;;1234 Golly Street;Sunnyside;CA;99999;USA
@@ -156,7 +156,7 @@
""".replace("\n", "\r\n"),
),
(
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
N:Thompson;Default;;;
FN:Default Thompson
@@ -170,7 +170,7 @@
X-Test:Some\, text.
END:VCARD
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;U
@@ -261,7 +261,7 @@
data = (
(
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
N:Thompson;Default;;;
FN:Default Thompson
@@ -272,8 +272,9 @@
item1.X-ABADR:us
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
END:VCARD
-""".replace("\n", "\r\n"), (
-"""BEGIN:VCARD
+""".replace("\n", "\r\n"),
+ (
+ """BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;U
@@ -286,9 +287,10 @@
item1.X-ABADR:us
END:VCARD
""".replace("\n", "\r\n"),
- )),
+ )
+ ),
(
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
N:Thompson;Default;;;
FN:Default Thompson
@@ -311,8 +313,9 @@
TEL;type=CELL:1-444-444-4445
item1.X-ABADR:us
END:VCARD
-""".replace("\n", "\r\n"), (
-"""BEGIN:VCARD
+""".replace("\n", "\r\n"),
+ (
+ """BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;U
@@ -325,7 +328,7 @@
item1.X-ABADR:us
END:VCARD
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E2:ABPerson
item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;U
@@ -338,7 +341,8 @@
item1.X-ABADR:us
END:VCARD
""".replace("\n", "\r\n"),
- )),
+ )
+ ),
)
for item, results in data:
@@ -394,7 +398,7 @@
def testParseFail(self):
data = (
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
N:Thompson;Default;;;
FN:Default Thompson
@@ -406,13 +410,13 @@
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
""".replace("\n", "\r\n"),
-"""BEGIN:VCALENDAR
+ """BEGIN:VCALENDAR
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
VERSION:2.0
END:VCALENDAR
""".replace("\n", "\r\n"),
-"""BOGUS
+ """BOGUS
BEGIN:VCARD
VERSION:3.0
N:Thompson;Default;;;
@@ -426,7 +430,7 @@
END:VCARD
""".replace("\n", "\r\n"),
-"""BOGUS
+ """BOGUS
BEGIN:VCARD
VERSION:3.0
@@ -441,7 +445,7 @@
END:VCARD
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
N:Thompson;Default;;;
FN:Default Thompson
@@ -455,7 +459,7 @@
BOGUS
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
N:Thompson;Default;;;
FN:Default Thompson
@@ -479,7 +483,7 @@
def testParseBlank(self):
data = (
-"""
+ """
BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
@@ -494,7 +498,7 @@
END:VCARD
""".replace("\n", "\r\n"),
-"""
+ """
BEGIN:VCARD
VERSION:3.0
@@ -510,7 +514,7 @@
END:VCARD
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;U
@@ -526,7 +530,7 @@
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;U
@@ -541,7 +545,7 @@
END:VCARD
""".replace("\n", "\r\n"),
-"""BEGIN:VCARD
+ """BEGIN:VCARD
VERSION:3.0
UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;U
Modified: PyCalendar/trunk/src/zonal/tzconvert.py
===================================================================
--- PyCalendar/trunk/src/zonal/tzconvert.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/zonal/tzconvert.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -319,7 +319,8 @@
endYear,
windowsAliases=windowsAliases,
filterzones=(
- #"America/Montevideo",
- #"Europe/Paris",
- #"Africa/Cairo",
- ))
+ # "America/Montevideo",
+ # "Europe/Paris",
+ # "Africa/Cairo",
+ )
+ )
Modified: PyCalendar/trunk/src/zonal/tzverify.py
===================================================================
--- PyCalendar/trunk/src/zonal/tzverify.py 2014-07-28 15:18:44 UTC (rev 13799)
+++ PyCalendar/trunk/src/zonal/tzverify.py 2014-07-29 14:53:07 UTC (rev 13800)
@@ -269,12 +269,12 @@
)
skips = (
- #"Europe/Sofia",
- #"Africa/Cairo",
+ # "Europe/Sofia",
+ # "Africa/Cairo",
)
only = (
- #"Europe/Lisbon",
+ # "Europe/Lisbon",
)
checkcalendar1 = loadCalendarFromZoneinfo(zonedir1, skips, only, verbose, quiet)
@@ -286,7 +286,7 @@
start,
end,
filterTzids=(
- #"America/Goose_Bay",
+ # "America/Goose_Bay",
),
verbose=verbose,
quiet=quiet,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140729/ec08b769/attachment-0001.html>
More information about the calendarserver-changes
mailing list