PEP8 compatibility
This commit is contained in:
parent
9982477759
commit
420c9a783c
1 changed files with 129 additions and 129 deletions
|
@ -1,11 +1,11 @@
|
|||
from __future__ import absolute_import
|
||||
from datetime import datetime, timedelta
|
||||
from calendar import monthrange
|
||||
import time
|
||||
import uuid
|
||||
import pytz
|
||||
import json
|
||||
|
||||
|
||||
class RemindersService(object):
|
||||
def __init__(self, service_root, session, params):
|
||||
self.session = session
|
||||
|
@ -41,8 +41,6 @@ class RemindersService(object):
|
|||
local_names.append(name)
|
||||
return local_names
|
||||
|
||||
|
||||
|
||||
def get_system_tz(self):
|
||||
"""
|
||||
Retrieves the system's timezone from a list of possible options.
|
||||
|
@ -50,8 +48,6 @@ class RemindersService(object):
|
|||
"""
|
||||
return self.get_all_possible_timezones_of_local_machine()[0]
|
||||
|
||||
|
||||
|
||||
def refresh(self):
|
||||
host = self._service_root.split('//')[1].split(':')[0]
|
||||
self.session.headers.update({'host': host})
|
||||
|
@ -83,7 +79,7 @@ class RemindersService(object):
|
|||
|
||||
if reminder['pGuid'] != collection['guid']:
|
||||
continue
|
||||
if reminder.has_key("dueDate"):
|
||||
if 'dueDate' in reminder:
|
||||
if reminder['dueDate']:
|
||||
due = datetime(
|
||||
reminder['dueDate'][1],
|
||||
|
@ -94,7 +90,10 @@ class RemindersService(object):
|
|||
due = None
|
||||
else:
|
||||
due = None
|
||||
desc=reminder['description'] if reminder['description'] else ""
|
||||
if reminder['description']:
|
||||
desc = reminder['description']
|
||||
else:
|
||||
desc = ""
|
||||
temp.append({
|
||||
"title": reminder['title'],
|
||||
"desc": desc,
|
||||
|
@ -105,7 +104,7 @@ class RemindersService(object):
|
|||
def post(self, title, description="", collection=None):
|
||||
pguid = 'tasks'
|
||||
if collection:
|
||||
if self.collections.has_key(collection):
|
||||
if collection in self.collections:
|
||||
pguid = self.collections[collection]['guid']
|
||||
|
||||
host = self._service_root.split('//')[1].split(':')[0]
|
||||
|
@ -145,3 +144,4 @@ class RemindersService(object):
|
|||
"ClientState": {"Collections": self.collections.values()}
|
||||
}),
|
||||
params=params_reminders)
|
||||
return req.ok
|
||||
|
|
Loading…
Reference in a new issue