changeset 29796 | 6ab838b20359 |
parent 29793 | 24991e7f775f |
child 30245 | 01703a8b8a46 |
--- a/contrib/check-code.py Mon Aug 15 16:07:55 2016 +0900 +++ b/contrib/check-code.py Tue Aug 16 17:15:54 2016 +0900 @@ -295,7 +295,7 @@ "comparison with singleton, use 'is' or 'is not' instead"), (r'^\s*(while|if) [01]:', "use True/False for constant Boolean expression"), - (r'(?:(?<!def)\s+|\()hasattr', + (r'(?:(?<!def)\s+|\()hasattr\(', 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), (r'opener\([^)]*\).read\(', "use opener.read() instead"),