[PATCH 9 of 9] check-code: Added a check for tuple parameter unpacking (unsupported in py3k)
Nicolas Dumazet
nicdumz at gmail.com
Thu Jul 1 22:05:33 CDT 2010
2010/7/2 Renato Cunha <renatoc at gmail.com>:
> contrib/check-code.py | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
>
> # HG changeset patch
> # User Renato Cunha <renatoc at gmail.com>
> # Date 1278023223 10800
> # Node ID 30cdc86a5b1dfb9df75f43b8bd8a02a00fee346f
> # Parent 1181d758256e0fc2f8033479a98ea39001e2582a
> check-code: Added a check for tuple parameter unpacking (unsupported in py3k)
>
> diff --git a/contrib/check-code.py b/contrib/check-code.py
> --- a/contrib/check-code.py
> +++ b/contrib/check-code.py
> @@ -70,6 +70,10 @@
> ]
>
> pypats = [
> + (r'^\s*def\s*\w+\s*\(.*,\s*\(',
> + "tuple parameter unpacking not available in Python 3+"),
> + (r'^\s*lambda\s*\(.*,.*\)',
> + "tuple parameter unpacking not available in Python 3+"),
I think that you want to remove the ^ here, and maybe even the \s. Why:
somecall(lambda (x, y): 4)
> (r'^\s*\t', "don't use tabs"),
> (r'\S;\s*\n', "semicolon"),
> (r'\w,\w', "missing whitespace after ,"),
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
--
Nicolas Dumazet — NicDumZ
More information about the Mercurial-devel
mailing list