Mercurial > public > mercurial-scm > hg
changeset 52738:e38292b85f9f
check-code: add support for walrus operator
Lets step into the previous decade future !
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 27 Jan 2025 19:47:43 +0100 |
parents | e5f97898122f |
children | f0c439952ecb |
files | contrib/check-code.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)",