check-code: add support for walrus operator
Lets step into the previous decade future !
--- a/contrib/check-code.py Tue Jan 28 21:21:07 2025 +0100
+++ b/contrib/check-code.py Mon Jan 27 19:47:43 2025 +0100
@@ -372,7 +372,7 @@
r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S',
"missing whitespace around operator",
),
- (r'[^^+=*/!<>&| %-](\s=|=\s)[^= ]', "wrong whitespace around ="),
+ (r'[^^+=*/!<>&| %-:](\s=|=\s)[^= ]', "wrong whitespace around ="),
(
r'raise [^,(]+, (\([^\)]+\)|[^,\(\)]+)$',
"don't use old-style two-argument raise, use Exception(message)",