changeset 29793:24991e7f775f

check-code: make dict() pattern less invasive 'foodict(x=y)' should be allowed.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 15 Aug 2016 17:17:39 +0900
parents 58467204cac0
children 4891f3b93182
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Sun Aug 14 21:29:46 2016 -0700
+++ b/contrib/check-code.py	Mon Aug 15 17:17:39 2016 +0900
@@ -237,7 +237,7 @@
      "tuple parameter unpacking not available in Python 3+"),
     (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"),
     (r'\breduce\s*\(.*', "reduce is not available in Python 3+"),
-    (r'dict\(.*=', 'dict() is different in Py2 and 3 and is slower than {}',
+    (r'\bdict\(.*=', 'dict() is different in Py2 and 3 and is slower than {}',
      'dict-from-generator'),
     (r'\.has_key\b', "dict.has_key is not available in Python 3+"),
     (r'\s<>\s', '<> operator is not available in Python 3+, use !='),