From 4ad80472902f175c77ecc872cc7f57d11d5933a9 Mon Sep 17 00:00:00 2001 From: Massimiliano Date: Mon, 8 Apr 2024 15:52:20 +0200 Subject: [PATCH] Remove many warnings (bugfix) (#1155) Remove many warnings --- checkbox-ng/plainbox/impl/exporter/jinja2.py | 2 +- checkbox-ng/plainbox/impl/exporter/xlsx.py | 12 ++-- checkbox-ng/plainbox/impl/result.py | 6 +- .../plainbox/impl/secure/providers/v1.py | 70 +++++++++---------- .../plainbox/impl/secure/qualifiers.py | 2 +- checkbox-ng/plainbox/impl/secure/rfc822.py | 2 +- .../plainbox/impl/session/assistant.py | 2 +- checkbox-ng/plainbox/impl/session/resume.py | 2 +- checkbox-ng/plainbox/impl/unit/exporter.py | 2 +- checkbox-ng/plainbox/impl/unit/job.py | 6 +- checkbox-ng/plainbox/impl/unit/testplan.py | 2 +- checkbox-ng/plainbox/impl/xparsers.py | 2 +- checkbox-ng/plainbox/provider_manager.py | 2 +- .../plainbox/vendor/sphinxarg/parser.py | 2 +- .../checkbox_support/parsers/pactl.py | 2 +- providers/base/bin/audio_driver_info.py | 6 +- 16 files changed, 61 insertions(+), 61 deletions(-) diff --git a/checkbox-ng/plainbox/impl/exporter/jinja2.py b/checkbox-ng/plainbox/impl/exporter/jinja2.py index 2d0e83520..ebe4389e4 100644 --- a/checkbox-ng/plainbox/impl/exporter/jinja2.py +++ b/checkbox-ng/plainbox/impl/exporter/jinja2.py @@ -78,7 +78,7 @@ def json_load_ordered_dict(text): def highlight_keys(text): """A filter for rendering keys as bold html text.""" - return re.sub('(\w+:\s)', r'\1', text) + return re.sub(r'(\w+:\s)', r'\1', text) class Jinja2SessionStateExporter(SessionStateExporterBase): diff --git a/checkbox-ng/plainbox/impl/exporter/xlsx.py b/checkbox-ng/plainbox/impl/exporter/xlsx.py index 9cf40b035..fff7eeded 100644 --- a/checkbox-ng/plainbox/impl/exporter/xlsx.py +++ b/checkbox-ng/plainbox/impl/exporter/xlsx.py @@ -239,30 +239,30 @@ def _hw_collection(self, data): if resource in data['attachment_map']: lspci = data['attachment_map'][resource] content = standard_b64decode(lspci.encode()).decode("UTF-8") - match = re.search('ISA bridge.*?:\s(?P.*?)\sLPC', content) + match = re.search(r'ISA bridge.*?:\s(?P.*?)\sLPC', content) if match: hw_info['chipset'] = match.group('chipset') match = re.search( - 'Audio device.*?:\s(?P