From e88d9eb39660046ee5bf4b243ce4a0c2ade244ae Mon Sep 17 00:00:00 2001 From: Nick Touran Date: Fri, 25 Oct 2024 08:27:03 -0400 Subject: [PATCH] Fix syntax warnings at startup. This fixes warnings when you run `armi` on the CLI: (armi) :~/code/armi$ armi /home/nick/code/armi/armi/settings/settingsValidation.py:781: SyntaxWarning: invalid escape sequence '\d' fullV = "\d+\.\d+\.\d+" /home/nick/code/armi/armi/settings/settingsValidation.py:782: SyntaxWarning: invalid escape sequence '\d' medV = "\d+\.\d+" /home/nick/code/armi/armi/settings/settingsValidation.py:783: SyntaxWarning: invalid escape sequence '\d' minV = "\d+" --- armi/settings/settingsValidation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/armi/settings/settingsValidation.py b/armi/settings/settingsValidation.py index ed11f5b33..6a4534a79 100644 --- a/armi/settings/settingsValidation.py +++ b/armi/settings/settingsValidation.py @@ -778,9 +778,9 @@ def validateVersion(versionThis: str, versionRequired: str) -> bool: bool Does this version match the version in the Settings file/object? """ - fullV = "\d+\.\d+\.\d+" - medV = "\d+\.\d+" - minV = "\d+" + fullV = r"\d+\.\d+\.\d+" + medV = r"\d+\.\d+" + minV = r"\d+" if versionRequired == "uncontrolled": # This default flag means we don't want to check the version.