mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-22 22:03:58 +03:00
pycodestyle: fix W605 invalid escape sequence
This commit is contained in:
parent
2d44912a70
commit
4adb1c8c30
@ -68,11 +68,11 @@ class Console(uiutils.UITestCase):
|
||||
self.assertTrue(lambda: win.active)
|
||||
|
||||
win.find("Send Key", "menu").click()
|
||||
win.find("Ctrl\+Alt\+F1", "menu item").click()
|
||||
win.find(r"Ctrl\+Alt\+F1", "menu item").click()
|
||||
win.find("Send Key", "menu").click()
|
||||
win.find("Ctrl\+Alt\+F10", "menu item").click()
|
||||
win.find(r"Ctrl\+Alt\+F10", "menu item").click()
|
||||
win.find("Send Key", "menu").click()
|
||||
win.find("Ctrl\+Alt\+Delete", "menu item").click()
|
||||
win.find(r"Ctrl\+Alt\+Delete", "menu item").click()
|
||||
|
||||
# 'Resize to VM' testing
|
||||
oldsize = win.size
|
||||
|
@ -97,7 +97,7 @@ class NewVM(uiutils.UITestCase):
|
||||
label.text = "windows 8"
|
||||
popover = newvm.find("oslist-popover")
|
||||
popover.find_fuzzy("Include end of life").click()
|
||||
popover.find_fuzzy("\(win8\)").click()
|
||||
popover.find_fuzzy(r"\(win8\)").click()
|
||||
newvm.find_fuzzy("Forward", "button").click()
|
||||
|
||||
# Verify that CPU values are non-default
|
||||
|
@ -1125,7 +1125,7 @@ class VirtCLIParser(object):
|
||||
def cb(inst, val, virtarg, can_edit):
|
||||
ignore = val
|
||||
num = 0
|
||||
reg = re.search("%s(\d+)" % cliarg, virtarg.key)
|
||||
reg = re.search(r"%s(\d+)" % cliarg, virtarg.key)
|
||||
if reg:
|
||||
num = int(reg.groups()[0])
|
||||
|
||||
|
@ -173,7 +173,7 @@ def path_is_url(path):
|
||||
"""
|
||||
if not path:
|
||||
return False
|
||||
return bool(re.match("[a-zA-Z]+(\+[a-zA-Z]+)?://.*", path))
|
||||
return bool(re.match(r"[a-zA-Z]+(\+[a-zA-Z]+)?://.*", path))
|
||||
|
||||
|
||||
def _get_dev_type(path, vol_xml, vol_object, pool_xml, remote):
|
||||
|
@ -150,21 +150,21 @@ class DomainCapabilities(XMLBuilder):
|
||||
# validate anything the user explicitly enters.
|
||||
_uefi_arch_patterns = {
|
||||
"i686": [
|
||||
".*ovmf-ia32.*", # fedora, gerd's firmware repo
|
||||
r".*ovmf-ia32.*", # fedora, gerd's firmware repo
|
||||
],
|
||||
"x86_64": [
|
||||
".*OVMF_CODE\.fd", # RHEL
|
||||
".*ovmf-x64/OVMF.*\.fd", # gerd's firmware repo
|
||||
".*ovmf-x86_64-.*", # SUSE
|
||||
".*ovmf.*", ".*OVMF.*", # generic attempt at a catchall
|
||||
r".*OVMF_CODE\.fd", # RHEL
|
||||
r".*ovmf-x64/OVMF.*\.fd", # gerd's firmware repo
|
||||
r".*ovmf-x86_64-.*", # SUSE
|
||||
r".*ovmf.*", ".*OVMF.*", # generic attempt at a catchall
|
||||
],
|
||||
"aarch64": [
|
||||
".*AAVMF_CODE\.fd", # RHEL
|
||||
".*aarch64/QEMU_EFI.*", # gerd's firmware repo
|
||||
".*aarch64.*", # generic attempt at a catchall
|
||||
r".*AAVMF_CODE\.fd", # RHEL
|
||||
r".*aarch64/QEMU_EFI.*", # gerd's firmware repo
|
||||
r".*aarch64.*", # generic attempt at a catchall
|
||||
],
|
||||
"armv7l": [
|
||||
".*arm/QEMU_EFI.*", # fedora, gerd's firmware repo
|
||||
r".*arm/QEMU_EFI.*", # fedora, gerd's firmware repo
|
||||
],
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ class RedHatDistro(Distro):
|
||||
|
||||
def _get_kernel_url_arg(self):
|
||||
def _is_old_rhdistro():
|
||||
m = re.match("^.*[^0-9\.]+([0-9\.]+)$", self._os_variant or "")
|
||||
m = re.match(r"^.*[^0-9\.]+([0-9\.]+)$", self._os_variant or "")
|
||||
if m:
|
||||
version = float(m.groups()[0])
|
||||
if "fedora" in self._os_variant and version < 19:
|
||||
@ -705,8 +705,8 @@ class DebianDistro(Distro):
|
||||
|
||||
|
||||
def _find_treearch(self):
|
||||
for pattern in ["^.*/installer-(\w+)/?$",
|
||||
"^.*/daily-images/(\w+)/?$"]:
|
||||
for pattern in [r"^.*/installer-(\w+)/?$",
|
||||
r"^.*/daily-images/(\w+)/?$"]:
|
||||
arch = re.findall(pattern, self.uri)
|
||||
if not arch:
|
||||
continue
|
||||
|
@ -533,7 +533,7 @@ class XMLBuilder(object):
|
||||
for prop in props:
|
||||
prop.clear(self)
|
||||
|
||||
is_child = bool(re.match("^.*\[\d+\]$", self._xmlstate.abs_xpath()))
|
||||
is_child = bool(re.match(r"^.*\[\d+\]$", self._xmlstate.abs_xpath()))
|
||||
if is_child or leave_stub:
|
||||
# User requested to clear an object that is the child of
|
||||
# another object (xpath ends in [1] etc). We can't fully remove
|
||||
|
Loading…
x
Reference in New Issue
Block a user