Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit bca38d0

Browse files
hugovkboogheta
authored andcommitted
Fix DeprecationWarning: invalid escape sequence
1 parent 7e219d2 commit bca38d0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

twitter/cmdline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ def __call__(self, twitter, options):
578578
else str(input("message: ")))
579579
statusTxt = statusTxt.replace('\\n', '\n')
580580
replies = []
581-
ptr = re.compile("@[\w_]+")
581+
ptr = re.compile(r"@[\w_]+")
582582
while statusTxt:
583583
s = ptr.match(statusTxt)
584584
if s and s.start() == 0:

twitter/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ def expand_line(line, sites):
159159

160160
def parse_host_list(list_of_hosts):
161161
"""Parse the comma separated list of hosts."""
162-
p = set(
163-
m.group(1) for m in re.finditer("\s*([^,\s]+)\s*,?\s*", list_of_hosts))
162+
p = {
163+
m.group(1) for m in re.finditer(r"\s*([^,\s]+)\s*,?\s*", list_of_hosts)}
164164
return p
165165

166166

0 commit comments

Comments
 (0)