mirror of https://github.com/Hoffelhas/autodoist
Preprend regex string literals with an 'r' making them raw strings
parent
335cb3ae75
commit
6cef067a9a
|
@ -683,8 +683,8 @@ def remove_label(task, label, overview_task_ids, overview_task_labels):
|
||||||
def check_header(api, model):
|
def check_header(api, model):
|
||||||
header_all_in_level = False
|
header_all_in_level = False
|
||||||
unheader_all_in_level = False
|
unheader_all_in_level = False
|
||||||
regex_a = '(^[*]{2}\s*)(.*)'
|
regex_a = r'(^[*]{2}\s*)(.*)'
|
||||||
regex_b = '(^\-\*\s*)(.*)'
|
regex_b = r'(^\-\*\s*)(.*)'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if isinstance(model, Task):
|
if isinstance(model, Task):
|
||||||
|
@ -1366,7 +1366,7 @@ def autodoist_magic(args, api, connection):
|
||||||
# If start-date has not passed yet, remove label
|
# If start-date has not passed yet, remove label
|
||||||
try:
|
try:
|
||||||
f1 = re.search(
|
f1 = re.search(
|
||||||
'start=(\d{2}[-]\d{2}[-]\d{4})', task.content)
|
r'start=(\d{2}[-]\d{2}[-]\d{4})', task.content)
|
||||||
if f1:
|
if f1:
|
||||||
start_date = f1.groups()[0]
|
start_date = f1.groups()[0]
|
||||||
start_date = datetime.strptime(
|
start_date = datetime.strptime(
|
||||||
|
@ -1389,7 +1389,7 @@ def autodoist_magic(args, api, connection):
|
||||||
if task.due is not None:
|
if task.due is not None:
|
||||||
try:
|
try:
|
||||||
f2 = re.search(
|
f2 = re.search(
|
||||||
'start=due-(\d+)([dw])', task.content)
|
r'start=due-(\d+)([dw])', task.content)
|
||||||
|
|
||||||
if f2:
|
if f2:
|
||||||
offset = f2.groups()[0]
|
offset = f2.groups()[0]
|
||||||
|
|
Loading…
Reference in New Issue