Permalink
Browse files

(check_codedep - print warning rather than error for variables starti…

…ng with '_' that are treated as non-private)

Ignore-this: 9bc15f275342eb25e16f6650f8b91515

darcs-hash:20121003090021-3a4db-0ec149b722f333349ca44e49905d23a17a6a26f5
  • Loading branch information...
1 parent 789650a commit ca5d7c43e73e867aa678985d9a79f61c176a5d1f @MattShannon committed Oct 3, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 check_codedep.py
View
@@ -201,7 +201,11 @@ def onLoadGlobalFound(name):
newLoadGlobals = set()
for name in loadGlobals:
if name.startswith('_') and not name.startswith('__'):
- newLoadGlobals.update(privateDeps[name])
+ if name in privateDeps:
+ newLoadGlobals.update(privateDeps[name])
+ else:
+ newLoadGlobals.add(name)
+ sys.stderr.write('NOTE: treating %s as non-private\n' % name)
else:
newLoadGlobals.add(name)
loadGlobalss[nodeIndex] = sorted(newLoadGlobals)

0 comments on commit ca5d7c4

Please sign in to comment.