mirror of
				https://github.com/b4tman/sync_ics2gcal
				synced 2025-11-04 12:38:32 +00:00 
			
		
		
		
	lint ical
This commit is contained in:
		@@ -17,7 +17,10 @@ def format_datetime_utc(value):
 | 
				
			|||||||
        value = datetime.datetime(
 | 
					        value = datetime.datetime(
 | 
				
			||||||
            value.year, value.month, value.day, tzinfo=utc)
 | 
					            value.year, value.month, value.day, tzinfo=utc)
 | 
				
			||||||
    value = value.replace(microsecond=1)
 | 
					    value = value.replace(microsecond=1)
 | 
				
			||||||
    return utc.normalize(value.astimezone(utc)).replace(tzinfo=None).isoformat() + 'Z'
 | 
					
 | 
				
			||||||
 | 
					    return utc.normalize(
 | 
				
			||||||
 | 
					        value.astimezone(utc)
 | 
				
			||||||
 | 
					    ).replace(tzinfo=None).isoformat() + 'Z'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def gcal_date_or_dateTime(value, check_value=None):
 | 
					def gcal_date_or_dateTime(value, check_value=None):
 | 
				
			||||||
@@ -145,7 +148,9 @@ class EventConverter(Event):
 | 
				
			|||||||
        self._put_to_gcal(
 | 
					        self._put_to_gcal(
 | 
				
			||||||
            event, 'updated', self._datetime_str_prop, 'LAST-MODIFIED')
 | 
					            event, 'updated', self._datetime_str_prop, 'LAST-MODIFIED')
 | 
				
			||||||
        self._put_to_gcal(
 | 
					        self._put_to_gcal(
 | 
				
			||||||
            event, 'transparency', lambda prop: self._str_prop(prop).lower(), 'TRANSP')
 | 
					            event,
 | 
				
			||||||
 | 
					            'transparency',
 | 
				
			||||||
 | 
					            lambda prop: self._str_prop(prop).lower(), 'TRANSP')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return event
 | 
					        return event
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -160,7 +165,7 @@ class CalendarConverter():
 | 
				
			|||||||
        self.calendar = calendar
 | 
					        self.calendar = calendar
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def load(self, filename):
 | 
					    def load(self, filename):
 | 
				
			||||||
        """ load calendar from ics file 
 | 
					        """ load calendar from ics file
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        with open(filename, 'r', encoding='utf-8') as f:
 | 
					        with open(filename, 'r', encoding='utf-8') as f:
 | 
				
			||||||
            self.calendar = Calendar.from_ical(f.read())
 | 
					            self.calendar = Calendar.from_ical(f.read())
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user