Sourcery AI suggests:

  Replace m.group(x) with m[x] for re.Match objects

Suggested-by: SourceryAI <he...@sourcery.ai>
Signed-off-by: Aaron Conole <acon...@redhat.com>
---
NOTE: This patch is doing two things:
      * Adopt a suggestion from SourceryAI
      * Test the automatic pull request generator.

 utilities/checkpatch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 6bcaf2dfd6..e4e867436d 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -404,7 +404,7 @@ def check_spelling(line, comment_type):
         words = ""
         matched = re.search(r'#([^!].*)$', line)
         if matched:
-            words = matched.group(1)
+            words = matched[1]
         else:
             words = line.replace("'''", '').replace('"""', '').strip()
     else:
-- 
2.49.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to