Regexps: Pre-compile GENERIC_TASK

This commit is contained in:
Tomas Babej 2014-12-29 09:29:20 +01:00
parent b4f83393ea
commit 62c853a0c2

View file

@ -30,7 +30,7 @@ TASKS_TO_SAVE_TO_TW = ''.join([
'(', UUID_COMMENT, FINAL_SEGMENT_SEPARATOR_UNNAMED, ')?' # UUID is not there for new tasks
])
GENERIC_TASK = ''.join([
GENERIC_TASK = re.compile(''.join([
EMPTY_SPACE,
BRACKET_OPENING,
COMPLETION_MARK,
@ -39,7 +39,7 @@ GENERIC_TASK = ''.join([
FINAL_SEGMENT_SEPARATOR_UNNAMED,
'(', DUE, FINAL_SEGMENT_SEPARATOR_UNNAMED, ')?' # Due is optional
'(', UUID_COMMENT, FINAL_SEGMENT_SEPARATOR_UNNAMED, ')?' # UUID is not there for new tasks
])
]))
"""