Fix deprecation warnings due to invalid escape sequences.

This commit is contained in:
Karthikeyan Singaravelan
2020-07-15 12:32:12 +00:00
parent 716384df32
commit 0d2d0142e1
4 changed files with 4 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ import fileinput
def gen(force=False):
if sys.platform == "win32":
bindir = "c:\Python34\Lib\site-packages\PyQt5"
bindir = r"c:\Python34\Lib\site-packages\PyQt5"
else:
bindir = "/usr/bin"

View File

@@ -19,7 +19,7 @@ with open("top_block.py", "r") as f:
start_vars, start_blocks = False, True
elif start_blocks and line.strip().startswith("self."):
try:
used_variables.append(re.search("\(([a-z\_0-9]*)[\)\,]", line).group(1))
used_variables.append(re.search(r"\(([a-z\_0-9]*)[\)\,]", line).group(1))
except AttributeError:
pass
elif line.strip().startswith("# Connections"):

View File

@@ -31,7 +31,7 @@ class PlutoSDR(Device):
def setup_device(cls, ctrl_connection: Connection, device_identifier):
device_identifier = device_identifier if isinstance(device_identifier, str) else ""
try:
device_identifier = re.search("(?<=\[).+?(?=\])", device_identifier).group(0)
device_identifier = re.search(r"(?<=\[).+?(?=\])", device_identifier).group(0)
except (IndexError, AttributeError):
pass

View File

@@ -77,7 +77,7 @@ class TestInstallation(unittest.TestCase):
self.assertTrue(docker_util.run_image(distribution, rebuild=False), msg=distribution)
def test_windows(self):
"""
r"""
Run the unittests on Windows + Install via Pip
To Fix Windows Error in Guest OS: