From 1aaa8d4d0c06fc5fcbcf2e1e01ad2f84a09ba940 Mon Sep 17 00:00:00 2001 From: Ross Smith II Date: Wed, 28 Feb 2024 17:48:15 -0800 Subject: [PATCH] Quiet SyntaxWarnings in python 3.12 I get ``` :2: SyntaxWarning: invalid escape sequence '\_' :917: SyntaxWarning: invalid escape sequence '\_' ``` when I `import wmi`. This PR quiets that. This also works: `python -W ignore -m pylint wmi.py` --- wmi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wmi.py b/wmi.py index 43c8278..c17dbb2 100644 --- a/wmi.py +++ b/wmi.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Windows Management Instrumentation (WMI) is Microsoft's answer to +r"""Windows Management Instrumentation (WMI) is Microsoft's answer to the DMTF's Common Information Model. It allows you to query just about any conceivable piece of information from any computer which is running the necessary agent and over which have you the @@ -914,7 +914,7 @@ def instances(self): handle_com_error() def new(self, **kwargs): - """This is the equivalent to the raw-WMI SpawnInstance\_ + r"""This is the equivalent to the raw-WMI SpawnInstance\_ method. Note that there are relatively few uses for this, certainly fewer than you might imagine. Most classes which need to create a new *real* instance