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)
|
show_dictionary(e)
|
||||||
raise error
|
raise error
|
||||||
|
|
||||||
|
|
||||||
def show_dictionary(data):
|
def show_dictionary(data):
|
||||||
for key in data.keys():
|
for key in data.keys():
|
||||||
print(key, "=", data[key])
|
print(key, "=", data[key])
|
||||||
|
|
||||||
|
|
||||||
def days_since(date, now):
|
def days_since(date, now):
|
||||||
if(date == None):
|
if(date == None):
|
||||||
return None
|
return None
|
||||||
return (now - date).days
|
return (now - date).days
|
||||||
|
|
||||||
|
|
||||||
def date_object_into_date_string(date):
|
def date_object_into_date_string(date):
|
||||||
if(date == None):
|
if(date == None):
|
||||||
return None
|
return None
|
||||||
return datetime.datetime.strftime(date, "%Y-%m-%d")
|
return datetime.datetime.strftime(date, "%Y-%m-%d")
|
||||||
|
|
||||||
|
|
||||||
def parse_date_string_into_date_object(incoming):
|
def parse_date_string_into_date_object(incoming):
|
||||||
if incoming == None:
|
if incoming == None:
|
||||||
return 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'
|
date = datetime.datetime.strptime(incoming, "%Y-%m-%dT%H:%M:%S.%fZ") # '2022-08-08T20:07:22.238Z'
|
||||||
return date
|
return date
|
||||||
|
|
||||||
|
|
||||||
def obtain_entry_link(provided_link, application_id):
|
def obtain_entry_link(provided_link, application_id):
|
||||||
if provided_link != None:
|
if provided_link != None:
|
||||||
if "Ealing" in application_id:
|
if "Ealing" in application_id:
|
||||||
|
Loading…
Reference in New Issue
Block a user