fix(re): use raw strings in all regexps
This commit is contained in:
parent
67740f30f3
commit
ed01a9a128
1 changed files with 4 additions and 4 deletions
|
|
@ -894,7 +894,7 @@ if __name__ == "__main__":
|
|||
uptaskfile = find_tasks(".task", task_dir.parent, config)
|
||||
if uptaskfile:
|
||||
uprelp = pathlib.Path(os.path.relpath(task_dir.parent, cwd))
|
||||
upreli = re.sub("\.\./*", "⮤", str(uprelp))
|
||||
upreli = re.sub(r"\.\./*", "⮤", str(uprelp))
|
||||
upjdata = get_data(uptaskfile)
|
||||
try:
|
||||
console.print(w.rtext(f"{upreli} {uptaskfile.parent.name}/: ", swatch="parentdir"), end="")
|
||||
|
|
@ -903,8 +903,8 @@ if __name__ == "__main__":
|
|||
pass
|
||||
|
||||
# Relative path to the directory holding the task files.
|
||||
rela = re.sub("\.\./*", "⮤", str(relp))
|
||||
reli = re.sub("\.", "", rela)
|
||||
rela = re.sub(r"\.\./*", "⮤", str(relp))
|
||||
reli = re.sub(r"\.", "", rela)
|
||||
if reli:
|
||||
console.rule(w.rtext(f"{reli} {task_dir.name}", swatch="taskdir"), style=config["color.taskdir"])
|
||||
else:
|
||||
|
|
@ -919,7 +919,7 @@ if __name__ == "__main__":
|
|||
downtaskfile = find_tasks(".task", pathlib.Path(f), config)
|
||||
if downtaskfile and downtaskfile != taskfile:
|
||||
downrelp = pathlib.Path(os.path.relpath(task_dir.parent, cwd))
|
||||
downreli = re.sub("\.\./*", "⮧ ", str(downrelp))
|
||||
downreli = re.sub(r"\.\./*", "⮧ ", str(downrelp))
|
||||
downjdata = get_data(downtaskfile)
|
||||
console.print(w.rtext(f"{downreli}./{downtaskfile.parent.name}: ", swatch="parentdir"), end="")
|
||||
console.print(w.rtext(f"{len(downjdata)} tasks", swatch="parentdir.tasks"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue