apply some pep8 rules to python script
This commit is contained in:
parent
9512d30c28
commit
58e6625790
@ -188,20 +188,24 @@ def insert_entry(cursor, e):
|
||||
show_dictionary(e)
|
||||
raise error
|
||||
|
||||
|
||||
def show_dictionary(data):
|
||||
for key in data.keys():
|
||||
print(key, "=", data[key])
|
||||
|
||||
|
||||
def days_since(date, now):
|
||||
if(date == None):
|
||||
return None
|
||||
return (now - date).days
|
||||
|
||||
|
||||
def date_object_into_date_string(date):
|
||||
if(date == None):
|
||||
return None
|
||||
return datetime.datetime.strftime(date, "%Y-%m-%d")
|
||||
|
||||
|
||||
def parse_date_string_into_date_object(incoming):
|
||||
if incoming == None:
|
||||
return None
|
||||
@ -212,6 +216,7 @@ def parse_date_string_into_date_object(incoming):
|
||||
date = datetime.datetime.strptime(incoming, "%Y-%m-%dT%H:%M:%S.%fZ") # '2022-08-08T20:07:22.238Z'
|
||||
return date
|
||||
|
||||
|
||||
def obtain_entry_link(provided_link, application_id):
|
||||
if provided_link != None:
|
||||
if "Ealing" in application_id:
|
||||
|
Loading…
Reference in New Issue
Block a user