##// END OF EJS Templates
check-code: using and/or/not as a function is bad style
Martin Geisler -
r12964:34034e55 default
parent child Browse files
Show More
@@ -118,6 +118,9 pypats = [
118 "linebreak after :"),
118 "linebreak after :"),
119 (r'class\s[^(]:', "old-style class, use class foo(object)"),
119 (r'class\s[^(]:', "old-style class, use class foo(object)"),
120 (r'^\s+del\(', "del isn't a function"),
120 (r'^\s+del\(', "del isn't a function"),
121 (r'\band\(', "and isn't a function"),
122 (r'\bor\(', "or isn't a function"),
123 (r'\bnot\(', "not isn't a function"),
121 (r'^\s+except\(', "except isn't a function"),
124 (r'^\s+except\(', "except isn't a function"),
122 (r',]', "unneeded trailing ',' in list"),
125 (r',]', "unneeded trailing ',' in list"),
123 # (r'class\s[A-Z][^\(]*\((?!Exception)',
126 # (r'class\s[A-Z][^\(]*\((?!Exception)',
@@ -1120,7 +1120,7 def debugpushkey(ui, repopath, namespace
1120 key, old, new = keyinfo
1120 key, old, new = keyinfo
1121 r = target.pushkey(namespace, key, old, new)
1121 r = target.pushkey(namespace, key, old, new)
1122 ui.status(str(r) + '\n')
1122 ui.status(str(r) + '\n')
1123 return not(r)
1123 return not r
1124 else:
1124 else:
1125 for k, v in target.listkeys(namespace).iteritems():
1125 for k, v in target.listkeys(namespace).iteritems():
1126 ui.write("%s\t%s\n" % (k.encode('string-escape'),
1126 ui.write("%s\t%s\n" % (k.encode('string-escape'),
@@ -111,7 +111,7 def _demandimport(name, globals=None, lo
111 mod = getattr(mod, comp)
111 mod = getattr(mod, comp)
112 for x in fromlist:
112 for x in fromlist:
113 # set requested submodules for demand load
113 # set requested submodules for demand load
114 if not(hasattr(mod, x)):
114 if not hasattr(mod, x):
115 setattr(mod, x, _demandmod(x, mod.__dict__, locals))
115 setattr(mod, x, _demandmod(x, mod.__dict__, locals))
116 return mod
116 return mod
117
117
General Comments 0
You need to be logged in to leave comments. Login now