diff --git a/bauh/gems/arch/pacman.py b/bauh/gems/arch/pacman.py index 00cef089..e760f9e8 100644 --- a/bauh/gems/arch/pacman.py +++ b/bauh/gems/arch/pacman.py @@ -290,7 +290,7 @@ def read_repository_from_info(name: str) -> Optional[str]: repository = None - for o in new_subprocess(['grep', '-Po', "Repository\s+:\s+\K.+"], stdin=info.stdout).stdout: + for o in new_subprocess(['grep', '-Po', r"Repository\s+:\s+\K.+"], stdin=info.stdout).stdout: if o: line = o.decode().strip() @@ -343,7 +343,7 @@ def read_provides(name: str) -> Set[str]: provides = None - for out in new_subprocess(['grep', '-Po', 'Provides\s+:\s\K(.+)'], stdin=dep_info.stdout).stdout: + for out in new_subprocess(['grep', '-Po', r'Provides\s+:\s\K(.+)'], stdin=dep_info.stdout).stdout: if out: provided_names = [p.strip() for p in out.decode().strip().split(' ') if p] @@ -372,7 +372,7 @@ def read_dependencies(name: str) -> Set[str]: raise PackageNotFoundException(name) depends_on = set() - for out in new_subprocess(['grep', '-Po', 'Depends\s+On\s+:\s\K(.+)'], stdin=dep_info.stdout).stdout: + for out in new_subprocess(['grep', '-Po', r'Depends\s+On\s+:\s\K(.+)'], stdin=dep_info.stdout).stdout: if out: line = out.decode().strip() diff --git a/bauh/gems/debian/index.py b/bauh/gems/debian/index.py index b86f7941..aa8e587d 100644 --- a/bauh/gems/debian/index.py +++ b/bauh/gems/debian/index.py @@ -140,7 +140,7 @@ class ApplicationsMapper: def __init__(self, logger: Logger, workers: int = 10): self._log = logger self._re_desktop_file = re.compile(r'(.+):\s+(/usr/share/applications/.+\.desktop)') - self._re_desktop_file_fields = re.compile('(Exec|TryExec|Icon|Categories|NoDisplay|Terminal)\s*=\s*(.+)') + self._re_desktop_file_fields = re.compile(r'(Exec|TryExec|Icon|Categories|NoDisplay|Terminal)\s*=\s*(.+)') self._workers = workers def _read_file(self, file_path: str) -> Optional[str]: diff --git a/bauh/gems/flatpak/flatpak.py b/bauh/gems/flatpak/flatpak.py index bbb85113..5db55ec2 100755 --- a/bauh/gems/flatpak/flatpak.py +++ b/bauh/gems/flatpak/flatpak.py @@ -16,7 +16,7 @@ RE_SEVERAL_SPACES = re.compile(r'\s+') RE_COMMIT = re.compile(r'(Latest commit|Commit)\s*:\s*(.+)') -RE_REQUIRED_RUNTIME = re.compile(f'Required\s+runtime\s+.+\(([\w./]+)\)\s*.+\s+remote\s+([\w+./]+)') +RE_REQUIRED_RUNTIME = re.compile(r'Required\s+runtime\s+.+\(([\w./]+)\)\s*.+\s+remote\s+([\w+./]+)') OPERATION_UPDATE_SYMBOLS = {'i', 'u'}