style: Double backslashes in strings

Not sure why, but if I change the DeprecationWarning filter to
"error", I get a SyntaxError from the \[ because it is an invalid
escape sequence. Not sure why that change triggers it, but
"\[" and "\\[" are the same, so this is a no-op.
This commit is contained in:
Jennifer Richards 2023-05-10 19:21:47 -03:00
parent eee145ee67
commit 0d070597b4
No known key found for this signature in database
GPG key ID: 9B2BF5C5ADDA6A6E

View file

@ -13,11 +13,11 @@ import warnings
from typing import Any, Dict, List, Tuple # pyflakes:ignore
warnings.simplefilter("always", DeprecationWarning)
warnings.filterwarnings("ignore", message="'urllib3\[secure\]' extra is deprecated")
warnings.filterwarnings("ignore", message="The logout\(\) view is superseded by")
warnings.filterwarnings("ignore", message="'urllib3\\[secure\\]' extra is deprecated")
warnings.filterwarnings("ignore", message="The logout\\(\\) view is superseded by")
warnings.filterwarnings("ignore", message="Report.file_reporters will no longer be available in Coverage.py 4.2", module="coverage.report")
warnings.filterwarnings("ignore", message="Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated", module="bleach")
warnings.filterwarnings("ignore", message="HTTPResponse.getheader\(\) is deprecated", module='selenium.webdriver')
warnings.filterwarnings("ignore", message="HTTPResponse.getheader\\(\\) is deprecated", module='selenium.webdriver')
try:
import syslog
syslog.openlog(str("datatracker"), syslog.LOG_PID, syslog.LOG_USER)