1
0
Fork 0
mirror of https://github.com/topydo/topydo.git synced 2024-05-20 05:48:35 +00:00

Fix escape deprecation warnings

Starting in Python 3.7, Python emits deprecation warning for normal
strings containing what it considers invalid backslash escapes. In
Python 3.9, this situation will be a syntax error. Fix the reported
instances.

ref https://lwn.net/Articles/795546/
This commit is contained in:
David Steele 2020-03-04 08:39:37 -05:00
parent b59fcfca53
commit bafbe2ed6b

View file

@ -223,7 +223,7 @@ today | in 2 days | in a day |
self.assertEqual(self.output, result)
def test_list_format12(self):
config(p_overrides={('ls', 'list_format'): '|%I| \%'})
config(p_overrides={('ls', 'list_format'): r'|%I| \%'})
command = ListCommand(["-x"], self.todolist, self.out, self.error)
command.execute()
@ -501,7 +501,7 @@ x 11 months ago
self.assertEqual(self.output, result)
def test_list_format33(self):
command = ListCommand(["-x", "-s", "desc:priority", "-F", "%{\%p}p{\%p}"], self.todolist, self.out, self.error)
command = ListCommand(["-x", "-s", "desc:priority", "-F", r"%{\%p}p{\%p}"], self.todolist, self.out, self.error)
command.execute()
result = """%pC%p