From 13d16b8c34298867919f93c6cc43de6ceaafc466 Mon Sep 17 00:00:00 2001 From: Javier Fuster Date: Thu, 16 Oct 2025 11:51:55 +0200 Subject: [PATCH] fix: use raw string for dashboard scope grammar Use raw string (r-string) prefix for the dashboard scope grammar string to prevent invalid escape sequence warnings for \- and \. patterns in the regex. This resolves SyntaxWarning issues in Python 3.13+ while maintaining the same regex functionality. All existing tests pass. --- sdcclient/monitor/dashboard_converters/_dashboard_scope.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdcclient/monitor/dashboard_converters/_dashboard_scope.py b/sdcclient/monitor/dashboard_converters/_dashboard_scope.py index f35e2703..6bb57f86 100644 --- a/sdcclient/monitor/dashboard_converters/_dashboard_scope.py +++ b/sdcclient/monitor/dashboard_converters/_dashboard_scope.py @@ -5,7 +5,7 @@ def convert_scope_string_to_expression(scope=None): if scope is None or not scope: return [True, []] - _SCOPE_GRAMMAR = """ + _SCOPE_GRAMMAR = r""" @@grammar::CALC start = expression $ ;