From: Zbigniew Jędrzejewski-Szmek Date: Mon, 22 Jan 2024 09:41:41 +0000 (+0100) Subject: Use an r-string for regexp X-Git-Tag: v21~98^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78dfc7fa38c77e657c15e8ae780e958936cd571c;p=thirdparty%2Fmkosi.git Use an r-string for regexp I think we should do so everywhere to avoid double escaping, even if here the string is the same length in both cases. --- diff --git a/mkosi/kmod.py b/mkosi/kmod.py index f950d7f01..d9efef8ca 100644 --- a/mkosi/kmod.py +++ b/mkosi/kmod.py @@ -13,7 +13,7 @@ from mkosi.types import PathString def loaded_modules() -> list[str]: - return [f"{line.split()[0]}\\.ko" for line in Path("/proc/modules").read_text().splitlines()] + return [fr"{line.split()[0]}\.ko" for line in Path("/proc/modules").read_text().splitlines()] def filter_kernel_modules(