bee_python 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (488) hide show
  1. data/{build/README → README} +1 -1
  2. data/egg/egg/build.yml +11 -49
  3. data/egg/egg.yml +19 -27
  4. data/egg/http/build.erb +32 -36
  5. data/egg/http/libhttp.py +102 -0
  6. data/egg/http/pylint.cfg +236 -0
  7. data/egg/http/server.py +7 -0
  8. data/egg/http/test.erb +32 -0
  9. data/egg/http.yml +33 -29
  10. data/egg/mysql/mysql.py +8 -9
  11. data/egg/project/build.erb +21 -53
  12. data/egg/project/pylint.cfg +236 -0
  13. data/egg/project/test.py +2 -2
  14. data/egg/project.yml +23 -31
  15. data/egg/script/build.erb +18 -23
  16. data/egg/script/pylint.cfg +236 -0
  17. data/egg/script.yml +22 -18
  18. data/egg/source/source.py +6 -6
  19. data/egg/test/test.py +1 -1
  20. data/lib/bee_task_python.rb +3 -34
  21. data/python.yml +123 -0
  22. metadata +61 -503
  23. data/test/build.yml +0 -16
  24. data/test/tc_bee_task_python.rb +0 -27
  25. data/test/test_build.rb +0 -26
  26. data/test/test_build_listener.rb +0 -110
  27. data/test/ts_bee_python.rb +0 -26
  28. data/tools/common/__init__.py +0 -5
  29. data/tools/common/common/__init__.py +0 -140
  30. data/tools/common/common/__pkginfo__.py +0 -43
  31. data/tools/common/common/adbh.py +0 -35
  32. data/tools/common/common/cache.py +0 -114
  33. data/tools/common/common/changelog.py +0 -234
  34. data/tools/common/common/clcommands.py +0 -181
  35. data/tools/common/common/cli.py +0 -212
  36. data/tools/common/common/compat.py +0 -328
  37. data/tools/common/common/configuration.py +0 -1087
  38. data/tools/common/common/contexts.py +0 -58
  39. data/tools/common/common/corbautils.py +0 -117
  40. data/tools/common/common/daemon.py +0 -171
  41. data/tools/common/common/date.py +0 -279
  42. data/tools/common/common/db.py +0 -49
  43. data/tools/common/common/dbf.py +0 -229
  44. data/tools/common/common/debugger.py +0 -208
  45. data/tools/common/common/decorators.py +0 -190
  46. data/tools/common/common/deprecation.py +0 -118
  47. data/tools/common/common/fileutils.py +0 -409
  48. data/tools/common/common/graph.py +0 -259
  49. data/tools/common/common/html.py +0 -142
  50. data/tools/common/common/interface.py +0 -76
  51. data/tools/common/common/logging_ext.py +0 -166
  52. data/tools/common/common/modutils.py +0 -670
  53. data/tools/common/common/optik_ext.py +0 -383
  54. data/tools/common/common/optparser.py +0 -92
  55. data/tools/common/common/pdf_ext.py +0 -111
  56. data/tools/common/common/proc.py +0 -276
  57. data/tools/common/common/pyro_ext.py +0 -146
  58. data/tools/common/common/pytest.py +0 -754
  59. data/tools/common/common/shellutils.py +0 -383
  60. data/tools/common/common/sphinx_ext.py +0 -87
  61. data/tools/common/common/sphinxutils.py +0 -122
  62. data/tools/common/common/sqlgen.py +0 -31
  63. data/tools/common/common/table.py +0 -930
  64. data/tools/common/common/tasksqueue.py +0 -97
  65. data/tools/common/common/test/__init__.py +0 -1
  66. data/tools/common/common/test/data/ChangeLog +0 -184
  67. data/tools/common/common/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
  68. data/tools/common/common/test/data/__init__.py +0 -1
  69. data/tools/common/common/test/data/content_differ_dir/NOTHING +0 -0
  70. data/tools/common/common/test/data/content_differ_dir/README +0 -1
  71. data/tools/common/common/test/data/content_differ_dir/subdir/coin +0 -1
  72. data/tools/common/common/test/data/content_differ_dir/subdir/toto.txt +0 -53
  73. data/tools/common/common/test/data/file_differ_dir/NOTHING +0 -0
  74. data/tools/common/common/test/data/file_differ_dir/README +0 -1
  75. data/tools/common/common/test/data/file_differ_dir/subdir/toto.txt +0 -53
  76. data/tools/common/common/test/data/file_differ_dir/subdirtwo/Hello +0 -0
  77. data/tools/common/common/test/data/find_test/__init__.py +0 -0
  78. data/tools/common/common/test/data/find_test/foo.txt +0 -0
  79. data/tools/common/common/test/data/find_test/module.py +0 -0
  80. data/tools/common/common/test/data/find_test/module2.py +0 -0
  81. data/tools/common/common/test/data/find_test/newlines.txt +0 -0
  82. data/tools/common/common/test/data/find_test/noendingnewline.py +0 -0
  83. data/tools/common/common/test/data/find_test/nonregr.py +0 -0
  84. data/tools/common/common/test/data/find_test/normal_file.txt +0 -0
  85. data/tools/common/common/test/data/find_test/spam.txt +0 -0
  86. data/tools/common/common/test/data/find_test/sub/doc.txt +0 -0
  87. data/tools/common/common/test/data/find_test/sub/momo.py +0 -0
  88. data/tools/common/common/test/data/find_test/test.ini +0 -0
  89. data/tools/common/common/test/data/find_test/test1.msg +0 -0
  90. data/tools/common/common/test/data/find_test/test2.msg +0 -0
  91. data/tools/common/common/test/data/find_test/write_protected_file.txt +0 -0
  92. data/tools/common/common/test/data/foo.txt +0 -9
  93. data/tools/common/common/test/data/module.py +0 -88
  94. data/tools/common/common/test/data/module2.py +0 -77
  95. data/tools/common/common/test/data/newlines.txt +0 -3
  96. data/tools/common/common/test/data/noendingnewline.py +0 -36
  97. data/tools/common/common/test/data/nonregr.py +0 -14
  98. data/tools/common/common/test/data/normal_file.txt +0 -0
  99. data/tools/common/common/test/data/reference_dir/NOTHING +0 -0
  100. data/tools/common/common/test/data/reference_dir/README +0 -1
  101. data/tools/common/common/test/data/reference_dir/subdir/coin +0 -1
  102. data/tools/common/common/test/data/reference_dir/subdir/toto.txt +0 -53
  103. data/tools/common/common/test/data/same_dir/NOTHING +0 -0
  104. data/tools/common/common/test/data/same_dir/README +0 -1
  105. data/tools/common/common/test/data/same_dir/subdir/coin +0 -1
  106. data/tools/common/common/test/data/same_dir/subdir/toto.txt +0 -53
  107. data/tools/common/common/test/data/spam.txt +0 -9
  108. data/tools/common/common/test/data/sub/doc.txt +0 -1
  109. data/tools/common/common/test/data/sub/momo.py +0 -1
  110. data/tools/common/common/test/data/subdir_differ_dir/NOTHING +0 -0
  111. data/tools/common/common/test/data/subdir_differ_dir/README +0 -1
  112. data/tools/common/common/test/data/subdir_differ_dir/subdir/coin +0 -1
  113. data/tools/common/common/test/data/subdir_differ_dir/subdir/toto.txt +0 -53
  114. data/tools/common/common/test/data/test.ini +0 -20
  115. data/tools/common/common/test/data/test1.msg +0 -30
  116. data/tools/common/common/test/data/test2.msg +0 -42
  117. data/tools/common/common/test/data/write_protected_file.txt +0 -0
  118. data/tools/common/common/test/foomod.py +0 -17
  119. data/tools/common/common/test/unittest_cache.py +0 -129
  120. data/tools/common/common/test/unittest_changelog.py +0 -37
  121. data/tools/common/common/test/unittest_compat.py +0 -239
  122. data/tools/common/common/test/unittest_configuration.py +0 -348
  123. data/tools/common/common/test/unittest_date.py +0 -154
  124. data/tools/common/common/test/unittest_decorators.py +0 -62
  125. data/tools/common/common/test/unittest_deprecation.py +0 -76
  126. data/tools/common/common/test/unittest_fileutils.py +0 -133
  127. data/tools/common/common/test/unittest_graph.py +0 -50
  128. data/tools/common/common/test/unittest_html.py +0 -76
  129. data/tools/common/common/test/unittest_interface.py +0 -87
  130. data/tools/common/common/test/unittest_modutils.py +0 -244
  131. data/tools/common/common/test/unittest_pytest.py +0 -50
  132. data/tools/common/common/test/unittest_shellutils.py +0 -248
  133. data/tools/common/common/test/unittest_table.py +0 -448
  134. data/tools/common/common/test/unittest_taskqueue.py +0 -71
  135. data/tools/common/common/test/unittest_testlib.py +0 -956
  136. data/tools/common/common/test/unittest_textutils.py +0 -247
  137. data/tools/common/common/test/unittest_tree.py +0 -248
  138. data/tools/common/common/test/unittest_umessage.py +0 -55
  139. data/tools/common/common/test/unittest_ureports_html.py +0 -64
  140. data/tools/common/common/test/unittest_ureports_text.py +0 -105
  141. data/tools/common/common/test/unittest_xmlutils.py +0 -75
  142. data/tools/common/common/test/utils.py +0 -87
  143. data/tools/common/common/testlib.py +0 -1927
  144. data/tools/common/common/textutils.py +0 -476
  145. data/tools/common/common/tree.py +0 -372
  146. data/tools/common/common/umessage.py +0 -161
  147. data/tools/common/common/ureports/__init__.py +0 -174
  148. data/tools/common/common/ureports/docbook_writer.py +0 -139
  149. data/tools/common/common/ureports/html_writer.py +0 -131
  150. data/tools/common/common/ureports/nodes.py +0 -201
  151. data/tools/common/common/ureports/text_writer.py +0 -140
  152. data/tools/common/common/vcgutils.py +0 -216
  153. data/tools/common/common/visitor.py +0 -107
  154. data/tools/common/common/xmlrpcutils.py +0 -136
  155. data/tools/common/common/xmlutils.py +0 -61
  156. data/tools/coverage/coverage.py +0 -602
  157. data/tools/epydoc/__init__.py +0 -227
  158. data/tools/epydoc/__init__.pyc +0 -0
  159. data/tools/epydoc/apidoc.py +0 -2203
  160. data/tools/epydoc/apidoc.pyc +0 -0
  161. data/tools/epydoc/checker.py +0 -349
  162. data/tools/epydoc/checker.pyc +0 -0
  163. data/tools/epydoc/cli.py +0 -1470
  164. data/tools/epydoc/cli.pyc +0 -0
  165. data/tools/epydoc/compat.py +0 -250
  166. data/tools/epydoc/compat.pyc +0 -0
  167. data/tools/epydoc/docbuilder.py +0 -1358
  168. data/tools/epydoc/docbuilder.pyc +0 -0
  169. data/tools/epydoc/docintrospecter.py +0 -1056
  170. data/tools/epydoc/docintrospecter.pyc +0 -0
  171. data/tools/epydoc/docparser.py +0 -2113
  172. data/tools/epydoc/docparser.pyc +0 -0
  173. data/tools/epydoc/docstringparser.py +0 -1111
  174. data/tools/epydoc/docstringparser.pyc +0 -0
  175. data/tools/epydoc/docwriter/__init__.py +0 -12
  176. data/tools/epydoc/docwriter/__init__.pyc +0 -0
  177. data/tools/epydoc/docwriter/dotgraph.py +0 -1351
  178. data/tools/epydoc/docwriter/dotgraph.pyc +0 -0
  179. data/tools/epydoc/docwriter/html.py +0 -3491
  180. data/tools/epydoc/docwriter/html.pyc +0 -0
  181. data/tools/epydoc/docwriter/html_colorize.py +0 -909
  182. data/tools/epydoc/docwriter/html_colorize.pyc +0 -0
  183. data/tools/epydoc/docwriter/html_css.py +0 -550
  184. data/tools/epydoc/docwriter/html_css.pyc +0 -0
  185. data/tools/epydoc/docwriter/html_help.py +0 -190
  186. data/tools/epydoc/docwriter/html_help.pyc +0 -0
  187. data/tools/epydoc/docwriter/latex.py +0 -1187
  188. data/tools/epydoc/docwriter/latex.pyc +0 -0
  189. data/tools/epydoc/docwriter/plaintext.py +0 -276
  190. data/tools/epydoc/docwriter/plaintext.pyc +0 -0
  191. data/tools/epydoc/docwriter/xlink.py +0 -505
  192. data/tools/epydoc/docwriter/xlink.pyc +0 -0
  193. data/tools/epydoc/gui.py +0 -1148
  194. data/tools/epydoc/gui.pyc +0 -0
  195. data/tools/epydoc/log.py +0 -204
  196. data/tools/epydoc/log.pyc +0 -0
  197. data/tools/epydoc/markup/__init__.py +0 -623
  198. data/tools/epydoc/markup/__init__.pyc +0 -0
  199. data/tools/epydoc/markup/doctest.py +0 -311
  200. data/tools/epydoc/markup/doctest.pyc +0 -0
  201. data/tools/epydoc/markup/epytext.py +0 -2116
  202. data/tools/epydoc/markup/epytext.pyc +0 -0
  203. data/tools/epydoc/markup/javadoc.py +0 -250
  204. data/tools/epydoc/markup/javadoc.pyc +0 -0
  205. data/tools/epydoc/markup/plaintext.py +0 -78
  206. data/tools/epydoc/markup/plaintext.pyc +0 -0
  207. data/tools/epydoc/markup/pyval_repr.py +0 -532
  208. data/tools/epydoc/markup/pyval_repr.pyc +0 -0
  209. data/tools/epydoc/markup/restructuredtext.py +0 -906
  210. data/tools/epydoc/markup/restructuredtext.pyc +0 -0
  211. data/tools/epydoc/test/__init__.py +0 -97
  212. data/tools/epydoc/test/__init__.pyc +0 -0
  213. data/tools/epydoc/test/util.py +0 -226
  214. data/tools/epydoc/test/util.pyc +0 -0
  215. data/tools/epydoc/util.py +0 -289
  216. data/tools/epydoc/util.pyc +0 -0
  217. data/tools/logilab/logilab/__init__.py +0 -5
  218. data/tools/logilab/logilab/astng/__init__.py +0 -82
  219. data/tools/logilab/logilab/astng/__pkginfo__.py +0 -76
  220. data/tools/logilab/logilab/astng/_exceptions.py +0 -64
  221. data/tools/logilab/logilab/astng/_nodes_ast.py +0 -667
  222. data/tools/logilab/logilab/astng/_nodes_compiler.py +0 -758
  223. data/tools/logilab/logilab/astng/bases.py +0 -608
  224. data/tools/logilab/logilab/astng/builder.py +0 -239
  225. data/tools/logilab/logilab/astng/inference.py +0 -426
  226. data/tools/logilab/logilab/astng/inspector.py +0 -289
  227. data/tools/logilab/logilab/astng/manager.py +0 -421
  228. data/tools/logilab/logilab/astng/mixins.py +0 -165
  229. data/tools/logilab/logilab/astng/node_classes.py +0 -848
  230. data/tools/logilab/logilab/astng/nodes.py +0 -85
  231. data/tools/logilab/logilab/astng/nodes_as_string.py +0 -389
  232. data/tools/logilab/logilab/astng/patchcomptransformer.py +0 -159
  233. data/tools/logilab/logilab/astng/protocols.py +0 -333
  234. data/tools/logilab/logilab/astng/raw_building.py +0 -212
  235. data/tools/logilab/logilab/astng/rebuilder.py +0 -307
  236. data/tools/logilab/logilab/astng/scoped_nodes.py +0 -951
  237. data/tools/logilab/logilab/astng/test/__init__.py +0 -19
  238. data/tools/logilab/logilab/astng/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
  239. data/tools/logilab/logilab/astng/test/data/MyPyPa-0.1.0-py2.5.zip +0 -0
  240. data/tools/logilab/logilab/astng/test/data/SSL1/Connection1.py +0 -33
  241. data/tools/logilab/logilab/astng/test/data/SSL1/__init__.py +0 -20
  242. data/tools/logilab/logilab/astng/test/data/__init__.py +0 -20
  243. data/tools/logilab/logilab/astng/test/data/all.py +0 -29
  244. data/tools/logilab/logilab/astng/test/data/appl/__init__.py +0 -23
  245. data/tools/logilab/logilab/astng/test/data/appl/myConnection.py +0 -30
  246. data/tools/logilab/logilab/astng/test/data/format.py +0 -34
  247. data/tools/logilab/logilab/astng/test/data/module.py +0 -90
  248. data/tools/logilab/logilab/astng/test/data/module2.py +0 -112
  249. data/tools/logilab/logilab/astng/test/data/noendingnewline.py +0 -57
  250. data/tools/logilab/logilab/astng/test/data/nonregr.py +0 -76
  251. data/tools/logilab/logilab/astng/test/data/notall.py +0 -28
  252. data/tools/logilab/logilab/astng/test/data2/__init__.py +0 -20
  253. data/tools/logilab/logilab/astng/test/data2/clientmodule_test.py +0 -51
  254. data/tools/logilab/logilab/astng/test/data2/suppliermodule_test.py +0 -32
  255. data/tools/logilab/logilab/astng/test/regrtest.py +0 -135
  256. data/tools/logilab/logilab/astng/test/regrtest_data/absimport.py +0 -22
  257. data/tools/logilab/logilab/astng/test/regrtest_data/descriptor_crash.py +0 -31
  258. data/tools/logilab/logilab/astng/test/regrtest_data/import_package_subpackage_module.py +0 -68
  259. data/tools/logilab/logilab/astng/test/regrtest_data/package/__init__.py +0 -24
  260. data/tools/logilab/logilab/astng/test/regrtest_data/package/subpackage/__init__.py +0 -20
  261. data/tools/logilab/logilab/astng/test/regrtest_data/package/subpackage/module.py +0 -20
  262. data/tools/logilab/logilab/astng/test/unittest_builder.py +0 -684
  263. data/tools/logilab/logilab/astng/test/unittest_inference.py +0 -1112
  264. data/tools/logilab/logilab/astng/test/unittest_inspector.py +0 -105
  265. data/tools/logilab/logilab/astng/test/unittest_lookup.py +0 -302
  266. data/tools/logilab/logilab/astng/test/unittest_manager.py +0 -98
  267. data/tools/logilab/logilab/astng/test/unittest_nodes.py +0 -302
  268. data/tools/logilab/logilab/astng/test/unittest_scoped_nodes.py +0 -501
  269. data/tools/logilab/logilab/astng/test/unittest_utils.py +0 -104
  270. data/tools/logilab/logilab/astng/utils.py +0 -342
  271. data/tools/logilab/logilab/common/__init__.py +0 -140
  272. data/tools/logilab/logilab/common/__pkginfo__.py +0 -43
  273. data/tools/logilab/logilab/common/adbh.py +0 -35
  274. data/tools/logilab/logilab/common/cache.py +0 -114
  275. data/tools/logilab/logilab/common/changelog.py +0 -234
  276. data/tools/logilab/logilab/common/clcommands.py +0 -181
  277. data/tools/logilab/logilab/common/cli.py +0 -212
  278. data/tools/logilab/logilab/common/compat.py +0 -328
  279. data/tools/logilab/logilab/common/configuration.py +0 -1087
  280. data/tools/logilab/logilab/common/contexts.py +0 -58
  281. data/tools/logilab/logilab/common/corbautils.py +0 -117
  282. data/tools/logilab/logilab/common/daemon.py +0 -171
  283. data/tools/logilab/logilab/common/date.py +0 -279
  284. data/tools/logilab/logilab/common/db.py +0 -49
  285. data/tools/logilab/logilab/common/dbf.py +0 -229
  286. data/tools/logilab/logilab/common/debugger.py +0 -208
  287. data/tools/logilab/logilab/common/decorators.py +0 -190
  288. data/tools/logilab/logilab/common/deprecation.py +0 -118
  289. data/tools/logilab/logilab/common/fileutils.py +0 -409
  290. data/tools/logilab/logilab/common/graph.py +0 -259
  291. data/tools/logilab/logilab/common/html.py +0 -142
  292. data/tools/logilab/logilab/common/interface.py +0 -76
  293. data/tools/logilab/logilab/common/logging_ext.py +0 -166
  294. data/tools/logilab/logilab/common/modutils.py +0 -670
  295. data/tools/logilab/logilab/common/optik_ext.py +0 -383
  296. data/tools/logilab/logilab/common/optparser.py +0 -92
  297. data/tools/logilab/logilab/common/pdf_ext.py +0 -111
  298. data/tools/logilab/logilab/common/proc.py +0 -276
  299. data/tools/logilab/logilab/common/pyro_ext.py +0 -146
  300. data/tools/logilab/logilab/common/pytest.py +0 -754
  301. data/tools/logilab/logilab/common/shellutils.py +0 -383
  302. data/tools/logilab/logilab/common/sphinx_ext.py +0 -87
  303. data/tools/logilab/logilab/common/sphinxutils.py +0 -122
  304. data/tools/logilab/logilab/common/sqlgen.py +0 -31
  305. data/tools/logilab/logilab/common/table.py +0 -930
  306. data/tools/logilab/logilab/common/tasksqueue.py +0 -97
  307. data/tools/logilab/logilab/common/test/__init__.py +0 -1
  308. data/tools/logilab/logilab/common/test/data/ChangeLog +0 -184
  309. data/tools/logilab/logilab/common/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
  310. data/tools/logilab/logilab/common/test/data/__init__.py +0 -1
  311. data/tools/logilab/logilab/common/test/data/content_differ_dir/NOTHING +0 -0
  312. data/tools/logilab/logilab/common/test/data/content_differ_dir/README +0 -1
  313. data/tools/logilab/logilab/common/test/data/content_differ_dir/subdir/coin +0 -1
  314. data/tools/logilab/logilab/common/test/data/content_differ_dir/subdir/toto.txt +0 -53
  315. data/tools/logilab/logilab/common/test/data/file_differ_dir/NOTHING +0 -0
  316. data/tools/logilab/logilab/common/test/data/file_differ_dir/README +0 -1
  317. data/tools/logilab/logilab/common/test/data/file_differ_dir/subdir/toto.txt +0 -53
  318. data/tools/logilab/logilab/common/test/data/file_differ_dir/subdirtwo/Hello +0 -0
  319. data/tools/logilab/logilab/common/test/data/find_test/__init__.py +0 -0
  320. data/tools/logilab/logilab/common/test/data/find_test/foo.txt +0 -0
  321. data/tools/logilab/logilab/common/test/data/find_test/module.py +0 -0
  322. data/tools/logilab/logilab/common/test/data/find_test/module2.py +0 -0
  323. data/tools/logilab/logilab/common/test/data/find_test/newlines.txt +0 -0
  324. data/tools/logilab/logilab/common/test/data/find_test/noendingnewline.py +0 -0
  325. data/tools/logilab/logilab/common/test/data/find_test/nonregr.py +0 -0
  326. data/tools/logilab/logilab/common/test/data/find_test/normal_file.txt +0 -0
  327. data/tools/logilab/logilab/common/test/data/find_test/spam.txt +0 -0
  328. data/tools/logilab/logilab/common/test/data/find_test/sub/doc.txt +0 -0
  329. data/tools/logilab/logilab/common/test/data/find_test/sub/momo.py +0 -0
  330. data/tools/logilab/logilab/common/test/data/find_test/test.ini +0 -0
  331. data/tools/logilab/logilab/common/test/data/find_test/test1.msg +0 -0
  332. data/tools/logilab/logilab/common/test/data/find_test/test2.msg +0 -0
  333. data/tools/logilab/logilab/common/test/data/find_test/write_protected_file.txt +0 -0
  334. data/tools/logilab/logilab/common/test/data/foo.txt +0 -9
  335. data/tools/logilab/logilab/common/test/data/module.py +0 -88
  336. data/tools/logilab/logilab/common/test/data/module2.py +0 -77
  337. data/tools/logilab/logilab/common/test/data/newlines.txt +0 -3
  338. data/tools/logilab/logilab/common/test/data/noendingnewline.py +0 -36
  339. data/tools/logilab/logilab/common/test/data/nonregr.py +0 -14
  340. data/tools/logilab/logilab/common/test/data/normal_file.txt +0 -0
  341. data/tools/logilab/logilab/common/test/data/reference_dir/NOTHING +0 -0
  342. data/tools/logilab/logilab/common/test/data/reference_dir/README +0 -1
  343. data/tools/logilab/logilab/common/test/data/reference_dir/subdir/coin +0 -1
  344. data/tools/logilab/logilab/common/test/data/reference_dir/subdir/toto.txt +0 -53
  345. data/tools/logilab/logilab/common/test/data/same_dir/NOTHING +0 -0
  346. data/tools/logilab/logilab/common/test/data/same_dir/README +0 -1
  347. data/tools/logilab/logilab/common/test/data/same_dir/subdir/coin +0 -1
  348. data/tools/logilab/logilab/common/test/data/same_dir/subdir/toto.txt +0 -53
  349. data/tools/logilab/logilab/common/test/data/spam.txt +0 -9
  350. data/tools/logilab/logilab/common/test/data/sub/doc.txt +0 -1
  351. data/tools/logilab/logilab/common/test/data/sub/momo.py +0 -1
  352. data/tools/logilab/logilab/common/test/data/subdir_differ_dir/NOTHING +0 -0
  353. data/tools/logilab/logilab/common/test/data/subdir_differ_dir/README +0 -1
  354. data/tools/logilab/logilab/common/test/data/subdir_differ_dir/subdir/coin +0 -1
  355. data/tools/logilab/logilab/common/test/data/subdir_differ_dir/subdir/toto.txt +0 -53
  356. data/tools/logilab/logilab/common/test/data/test.ini +0 -20
  357. data/tools/logilab/logilab/common/test/data/test1.msg +0 -30
  358. data/tools/logilab/logilab/common/test/data/test2.msg +0 -42
  359. data/tools/logilab/logilab/common/test/data/write_protected_file.txt +0 -0
  360. data/tools/logilab/logilab/common/test/foomod.py +0 -17
  361. data/tools/logilab/logilab/common/test/unittest_cache.py +0 -129
  362. data/tools/logilab/logilab/common/test/unittest_changelog.py +0 -37
  363. data/tools/logilab/logilab/common/test/unittest_compat.py +0 -239
  364. data/tools/logilab/logilab/common/test/unittest_configuration.py +0 -348
  365. data/tools/logilab/logilab/common/test/unittest_date.py +0 -154
  366. data/tools/logilab/logilab/common/test/unittest_decorators.py +0 -62
  367. data/tools/logilab/logilab/common/test/unittest_deprecation.py +0 -76
  368. data/tools/logilab/logilab/common/test/unittest_fileutils.py +0 -133
  369. data/tools/logilab/logilab/common/test/unittest_graph.py +0 -50
  370. data/tools/logilab/logilab/common/test/unittest_html.py +0 -76
  371. data/tools/logilab/logilab/common/test/unittest_interface.py +0 -87
  372. data/tools/logilab/logilab/common/test/unittest_modutils.py +0 -244
  373. data/tools/logilab/logilab/common/test/unittest_pytest.py +0 -50
  374. data/tools/logilab/logilab/common/test/unittest_shellutils.py +0 -248
  375. data/tools/logilab/logilab/common/test/unittest_table.py +0 -448
  376. data/tools/logilab/logilab/common/test/unittest_taskqueue.py +0 -71
  377. data/tools/logilab/logilab/common/test/unittest_testlib.py +0 -956
  378. data/tools/logilab/logilab/common/test/unittest_textutils.py +0 -247
  379. data/tools/logilab/logilab/common/test/unittest_tree.py +0 -248
  380. data/tools/logilab/logilab/common/test/unittest_umessage.py +0 -55
  381. data/tools/logilab/logilab/common/test/unittest_ureports_html.py +0 -64
  382. data/tools/logilab/logilab/common/test/unittest_ureports_text.py +0 -105
  383. data/tools/logilab/logilab/common/test/unittest_xmlutils.py +0 -75
  384. data/tools/logilab/logilab/common/test/utils.py +0 -87
  385. data/tools/logilab/logilab/common/testlib.py +0 -1927
  386. data/tools/logilab/logilab/common/textutils.py +0 -476
  387. data/tools/logilab/logilab/common/tree.py +0 -372
  388. data/tools/logilab/logilab/common/umessage.py +0 -161
  389. data/tools/logilab/logilab/common/ureports/__init__.py +0 -174
  390. data/tools/logilab/logilab/common/ureports/docbook_writer.py +0 -139
  391. data/tools/logilab/logilab/common/ureports/html_writer.py +0 -131
  392. data/tools/logilab/logilab/common/ureports/nodes.py +0 -201
  393. data/tools/logilab/logilab/common/ureports/text_writer.py +0 -140
  394. data/tools/logilab/logilab/common/vcgutils.py +0 -216
  395. data/tools/logilab/logilab/common/visitor.py +0 -107
  396. data/tools/logilab/logilab/common/xmlrpcutils.py +0 -136
  397. data/tools/logilab/logilab/common/xmlutils.py +0 -61
  398. data/tools/pychecker/COPYRIGHT +0 -31
  399. data/tools/pychecker/ChangeLog +0 -349
  400. data/tools/pychecker/CodeChecks.py +0 -1969
  401. data/tools/pychecker/CodeChecks.pyc +0 -0
  402. data/tools/pychecker/CodeChecks.pyo +0 -0
  403. data/tools/pychecker/Config.py +0 -475
  404. data/tools/pychecker/Config.pyc +0 -0
  405. data/tools/pychecker/Config.pyo +0 -0
  406. data/tools/pychecker/KNOWN_BUGS +0 -100
  407. data/tools/pychecker/MAINTAINERS +0 -81
  408. data/tools/pychecker/NEWS +0 -406
  409. data/tools/pychecker/OP.py +0 -131
  410. data/tools/pychecker/OP.pyc +0 -0
  411. data/tools/pychecker/OP.pyo +0 -0
  412. data/tools/pychecker/OptionTypes.py +0 -117
  413. data/tools/pychecker/OptionTypes.pyc +0 -0
  414. data/tools/pychecker/OptionTypes.pyo +0 -0
  415. data/tools/pychecker/README +0 -152
  416. data/tools/pychecker/Stack.py +0 -115
  417. data/tools/pychecker/Stack.pyc +0 -0
  418. data/tools/pychecker/Stack.pyo +0 -0
  419. data/tools/pychecker/TODO +0 -101
  420. data/tools/pychecker/VERSION +0 -1
  421. data/tools/pychecker/Warning.py +0 -50
  422. data/tools/pychecker/Warning.pyc +0 -0
  423. data/tools/pychecker/Warning.pyo +0 -0
  424. data/tools/pychecker/__init__.py +0 -17
  425. data/tools/pychecker/__init__.pyc +0 -0
  426. data/tools/pychecker/__init__.pyo +0 -0
  427. data/tools/pychecker/checker.py +0 -961
  428. data/tools/pychecker/checker.pyc +0 -0
  429. data/tools/pychecker/checker.pyo +0 -0
  430. data/tools/pychecker/function.py +0 -159
  431. data/tools/pychecker/function.pyc +0 -0
  432. data/tools/pychecker/function.pyo +0 -0
  433. data/tools/pychecker/msgs.py +0 -175
  434. data/tools/pychecker/msgs.pyc +0 -0
  435. data/tools/pychecker/msgs.pyo +0 -0
  436. data/tools/pychecker/options.py +0 -275
  437. data/tools/pychecker/options.pyc +0 -0
  438. data/tools/pychecker/options.pyo +0 -0
  439. data/tools/pychecker/pcmodules.py +0 -19
  440. data/tools/pychecker/pcmodules.pyc +0 -0
  441. data/tools/pychecker/pcmodules.pyo +0 -0
  442. data/tools/pychecker/printer.py +0 -47
  443. data/tools/pychecker/printer.pyc +0 -0
  444. data/tools/pychecker/printer.pyo +0 -0
  445. data/tools/pychecker/python.py +0 -427
  446. data/tools/pychecker/python.pyc +0 -0
  447. data/tools/pychecker/python.pyo +0 -0
  448. data/tools/pychecker/utils.py +0 -102
  449. data/tools/pychecker/utils.pyc +0 -0
  450. data/tools/pychecker/utils.pyo +0 -0
  451. data/tools/pychecker/warn.py +0 -778
  452. data/tools/pychecker/warn.pyc +0 -0
  453. data/tools/pychecker/warn.pyo +0 -0
  454. data/tools/pylint2/pylint/__init__.py +0 -16
  455. data/tools/pylint2/pylint/__pkginfo__.py +0 -67
  456. data/tools/pylint2/pylint/checkers/__init__.py +0 -155
  457. data/tools/pylint2/pylint/checkers/base.py +0 -749
  458. data/tools/pylint2/pylint/checkers/classes.py +0 -527
  459. data/tools/pylint2/pylint/checkers/design_analysis.py +0 -344
  460. data/tools/pylint2/pylint/checkers/exceptions.py +0 -183
  461. data/tools/pylint2/pylint/checkers/format.py +0 -367
  462. data/tools/pylint2/pylint/checkers/imports.py +0 -379
  463. data/tools/pylint2/pylint/checkers/logging.py +0 -98
  464. data/tools/pylint2/pylint/checkers/misc.py +0 -128
  465. data/tools/pylint2/pylint/checkers/newstyle.py +0 -107
  466. data/tools/pylint2/pylint/checkers/raw_metrics.py +0 -125
  467. data/tools/pylint2/pylint/checkers/similar.py +0 -333
  468. data/tools/pylint2/pylint/checkers/string_format.py +0 -239
  469. data/tools/pylint2/pylint/checkers/typecheck.py +0 -364
  470. data/tools/pylint2/pylint/checkers/utils.py +0 -208
  471. data/tools/pylint2/pylint/checkers/variables.py +0 -498
  472. data/tools/pylint2/pylint/config.py +0 -149
  473. data/tools/pylint2/pylint/epylint.py +0 -149
  474. data/tools/pylint2/pylint/gui.py +0 -433
  475. data/tools/pylint2/pylint/interfaces.py +0 -98
  476. data/tools/pylint2/pylint/lint.py +0 -914
  477. data/tools/pylint2/pylint/pyreverse/__init__.py +0 -5
  478. data/tools/pylint2/pylint/pyreverse/diadefslib.py +0 -229
  479. data/tools/pylint2/pylint/pyreverse/diagrams.py +0 -247
  480. data/tools/pylint2/pylint/pyreverse/main.py +0 -123
  481. data/tools/pylint2/pylint/pyreverse/utils.py +0 -131
  482. data/tools/pylint2/pylint/pyreverse/writer.py +0 -196
  483. data/tools/pylint2/pylint/reporters/__init__.py +0 -67
  484. data/tools/pylint2/pylint/reporters/guireporter.py +0 -36
  485. data/tools/pylint2/pylint/reporters/html.py +0 -69
  486. data/tools/pylint2/pylint/reporters/text.py +0 -156
  487. data/tools/pylint2/pylint/utils.py +0 -518
  488. data/tools/pylint2/pylint.py +0 -16
Binary file
Binary file
@@ -1,159 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- # Copyright (c) 2001-2002, MetaSlash Inc. All rights reserved.
4
-
5
- """
6
- Object to hold information about functions.
7
- Also contain a pseudo Python function object
8
- """
9
-
10
- import string
11
-
12
- _ARGS_ARGS_FLAG = 4
13
- _KW_ARGS_FLAG = 8
14
- _CO_FLAGS_MASK = _ARGS_ARGS_FLAG + _KW_ARGS_FLAG
15
-
16
- class _ReturnValues:
17
- def __init__(self):
18
- self.returnValues = None
19
-
20
- def returnsNoValue(self):
21
- returnValues = self.returnValues
22
- # if unset, we don't know
23
- if returnValues is None:
24
- return 0
25
- # it's an empty list, that means no values
26
- if not returnValues:
27
- return 1
28
- # make sure each value is not None
29
- for rv in returnValues:
30
- if not rv[1].isNone():
31
- return 0
32
- return returnValues[-1][1].isImplicitNone()
33
-
34
- class FakeCode :
35
- "This is a holder class for code objects (so we can modify them)"
36
- def __init__(self, code, varnames = None) :
37
- for attr in dir(code):
38
- try:
39
- setattr(self, attr, getattr(code, attr))
40
- except:
41
- pass
42
- if varnames is not None:
43
- self.co_varnames = varnames
44
-
45
- class FakeFunction(_ReturnValues):
46
- "This is a holder class for turning code at module level into a function"
47
-
48
- def __init__(self, name, code, func_globals = {}, varnames = None) :
49
- _ReturnValues.__init__(self)
50
- self.func_name = self.__name__ = name
51
- self.func_doc = self.__doc__ = "ignore"
52
-
53
- self.func_code = FakeCode(code, varnames)
54
- self.func_defaults = None
55
- self.func_globals = func_globals
56
-
57
- def __str__(self):
58
- return self.func_name
59
-
60
- def __repr__(self):
61
- return '%s from %r' % (self.func_name, self.func_code.co_filename)
62
-
63
- class Function(_ReturnValues):
64
- "Class to hold all information about a function"
65
-
66
- def __init__(self, function, isMethod=0):
67
- _ReturnValues.__init__(self)
68
- self.function = function
69
- self.isMethod = isMethod
70
- self.minArgs = self.maxArgs = function.func_code.co_argcount
71
- if function.func_defaults is not None :
72
- self.minArgs = self.minArgs - len(function.func_defaults)
73
- # if function uses *args, there is no max # args
74
- try:
75
- if function.func_code.co_flags & _ARGS_ARGS_FLAG != 0 :
76
- self.maxArgs = None
77
- self.supportsKW = function.func_code.co_flags & _KW_ARGS_FLAG
78
- except AttributeError:
79
- # this happens w/Zope
80
- self.supportsKW = 0
81
-
82
- def __str__(self):
83
- return self.function.func_name
84
-
85
- def __repr__(self):
86
- return '%s from %r:%d' % (self.function.func_name,
87
- self.function.func_code.co_filename,
88
- self.function.func_code.co_firstlineno)
89
-
90
- def arguments(self) :
91
- numArgs = self.function.func_code.co_argcount
92
- if self.maxArgs is None :
93
- numArgs = numArgs + 1
94
- if self.supportsKW :
95
- numArgs = numArgs + 1
96
- return self.function.func_code.co_varnames[:numArgs]
97
-
98
- def isParam(self, name) :
99
- return name in self.arguments()
100
-
101
- def isStaticMethod(self):
102
- return self.isMethod and isinstance(self.function, type(create_fake))
103
-
104
- def isClassMethod(self):
105
- try:
106
- return self.isMethod and self.function.im_self is not None
107
- except AttributeError:
108
- return 0
109
-
110
- def defaultValue(self, name) :
111
- func_code = self.function.func_code
112
- arg_names = list(func_code.co_varnames[:func_code.co_argcount])
113
- i = arg_names.index(name)
114
- if i < self.minArgs :
115
- raise ValueError
116
- return self.function.func_defaults[i - self.minArgs]
117
-
118
- def varArgName(self) :
119
- if self.maxArgs is not None :
120
- return None
121
- func_code = self.function.func_code
122
- return func_code.co_varnames[func_code.co_argcount]
123
-
124
- def create_fake(name, code, func_globals = {}, varnames = None) :
125
- return Function(FakeFunction(name, code, func_globals, varnames))
126
-
127
- def create_from_file(file, filename, module) :
128
- if file is None:
129
- return create_fake(filename, compile('', filename, 'exec'))
130
-
131
- # Make sure the file is at the beginning
132
- # if python compiled the file, it will be at the end
133
- file.seek(0)
134
-
135
- # Read in the source file, see py_compile.compile() for games w/src str
136
- codestr = file.read()
137
- codestr = string.replace(codestr, "\r\n", "\n")
138
- codestr = string.replace(codestr, "\r", "\n")
139
- if codestr and codestr[-1] != '\n' :
140
- codestr = codestr + '\n'
141
- code = compile(codestr, filename, 'exec')
142
- return Function(FakeFunction('__main__', code, module.__dict__))
143
-
144
- def _co_flags_equal(o1, o2) :
145
- return (o1.co_flags & _CO_FLAGS_MASK) == (o2.co_flags & _CO_FLAGS_MASK)
146
-
147
- def same_signature(func, object) :
148
- '''Return a boolean value if the <func> has the same signature as
149
- a function with the same name in <object> (ie, an overriden method)'''
150
-
151
- try :
152
- baseMethod = getattr(object, func.func_name)
153
- base_func_code = baseMethod.im_func.func_code
154
- except AttributeError :
155
- return 1
156
-
157
- return _co_flags_equal(base_func_code, func.func_code) and \
158
- base_func_code.co_argcount == func.func_code.co_argcount
159
-
Binary file
Binary file
@@ -1,175 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- # Copyright (c) 2001-2004, MetaSlash Inc. All rights reserved.
4
- # Portions Copyright (c) 2005, Google, Inc. All rights reserved.
5
-
6
- """
7
- Warning Messages for PyChecker
8
- """
9
-
10
- import UserString
11
-
12
- class WarningClass:
13
- level = 0
14
-
15
- def __init__(self, msg, level_offset=None):
16
- self.msg = msg
17
- if level_offset is not None:
18
- self.level += level_offset
19
-
20
- def __mod__(self, args):
21
- result = UserString.UserString(self.msg % args)
22
- result.level = self.level
23
- return result
24
-
25
- def __str__(self):
26
- return self.msg
27
-
28
- class Internal(WarningClass):
29
- level = 100
30
-
31
- class Error(WarningClass):
32
- level = 90
33
-
34
- class Security(WarningClass):
35
- level = 90
36
-
37
- class Warning(WarningClass):
38
- level = 70
39
-
40
- class Unused(WarningClass):
41
- level = 50
42
-
43
- class Deprecated(WarningClass):
44
- level = 40
45
-
46
- class Style(WarningClass):
47
- level = 10
48
-
49
- TOO_MANY_WARNINGS = WarningClass("%d errors suppressed, use -#/--limit to increase the number of errors displayed")
50
- CHECKER_BROKEN = Internal("INTERNAL ERROR -- STOPPED PROCESSING FUNCTION --\n\t%s")
51
- INVALID_CHECKER_ARGS = Internal("Invalid warning suppression arguments --\n\t%s")
52
-
53
- NO_MODULE_DOC = Style("No module doc string")
54
- NO_CLASS_DOC = Style("No doc string for class %s")
55
- NO_FUNC_DOC = Style("No doc string for function %s")
56
-
57
- VAR_NOT_USED = Unused("Variable (%s) not used")
58
- IMPORT_NOT_USED = Unused("Imported module (%s) not used")
59
- UNUSED_LOCAL = Unused("Local variable (%s) not used")
60
- UNUSED_PARAMETER = Unused("Parameter (%s) not used")
61
- UNUSED_MEMBERS = Unused("Members (%s) not used in class (%s)")
62
- NO_LOCAL_VAR = Unused("No local variable (%s)")
63
- VAR_USED_BEFORE_SET = Warning("Variable (%s) used before being set")
64
-
65
- REDEFINING_ATTR = Warning("Redefining attribute (%s) original line (%d)")
66
-
67
- MODULE_IMPORTED_AGAIN = Warning("Module (%s) re-imported")
68
- MODULE_MEMBER_IMPORTED_AGAIN = Warning("Module member (%s) re-imported")
69
- MODULE_MEMBER_ALSO_STAR_IMPORTED = Warning("Module member (%s) re-imported with *")
70
- MIX_IMPORT_AND_FROM_IMPORT = Warning("Using import and from ... import for (%s)")
71
- IMPORT_SELF = Warning("Module (%s) imports itself")
72
-
73
- NO_METHOD_ARGS = Error("No method arguments, should have %s as argument")
74
- SELF_NOT_FIRST_ARG = Error("%s is not first %smethod argument")
75
- SELF_IS_ARG = Error("self is argument in %s")
76
- RETURN_FROM_INIT = Error("Cannot return a value from __init__")
77
- NO_CTOR_ARGS = Error("Instantiating an object with arguments, but no constructor")
78
-
79
- GLOBAL_DEFINED_NOT_DECLARED = Warning("Global variable (%s) not defined in module scope")
80
- INVALID_GLOBAL = Error("No global (%s) found")
81
- INVALID_METHOD = Error("No method (%s) found")
82
- INVALID_CLASS_ATTR = Warning("No class attribute (%s) found")
83
- INVALID_SET_CLASS_ATTR = Warning("Setting class attribute (%s) not set in __init__")
84
- INVALID_MODULE_ATTR = Error("No module attribute (%s) found")
85
-
86
- LOCAL_SHADOWS_GLOBAL = Warning("Local variable (%s) shadows global defined on line %d")
87
- VARIABLE_SHADOWS_BUILTIN = Warning("(%s) shadows builtin")
88
- USING_METHOD_AS_ATTR = Warning("Using method (%s) as an attribute (not invoked)")
89
- OBJECT_HAS_NO_ATTR = Warning("Object (%s) has no attribute (%s)")
90
- METHOD_SIGNATURE_MISMATCH = Warning("Overridden method (%s) doesn't match signature in class (%s)")
91
-
92
- INVALID_ARG_COUNT1 = Error("Invalid arguments to (%s), got %d, expected %d")
93
- INVALID_ARG_COUNT2 = Error("Invalid arguments to (%s), got %d, expected at least %d")
94
- INVALID_ARG_COUNT3 = Error("Invalid arguments to (%s), got %d, expected between %d and %d")
95
- FUNC_DOESNT_SUPPORT_KW = Error("Function (%s) doesn't support **kwArgs")
96
- FUNC_DOESNT_SUPPORT_KW_ARG = Error("Function (%s) doesn't support **kwArgs for name (%s)")
97
- FUNC_USES_NAMED_ARGS = Warning("Function (%s) uses named arguments")
98
-
99
- BASE_CLASS_NOT_INIT = Warning("Base class (%s) __init__() not called")
100
- NO_INIT_IN_SUBCLASS = Warning("No __init__() in subclass (%s)")
101
- METHODS_NEED_OVERRIDE = Error("Methods (%s) in %s need to be overridden in a subclass")
102
-
103
- FUNC_TOO_LONG = Style("Function (%s) has too many lines (%d)")
104
- TOO_MANY_BRANCHES = Style("Function (%s) has too many branches (%d)")
105
- TOO_MANY_RETURNS = Style("Function (%s) has too many returns (%d)")
106
- TOO_MANY_ARGS = Style("Function (%s) has too many arguments (%d)")
107
- TOO_MANY_LOCALS = Style("Function (%s) has too many local variables (%d)")
108
- TOO_MANY_REFERENCES = Style('Law of Demeter violated, more than %d references for (%s)')
109
-
110
- IMPLICIT_AND_EXPLICIT_RETURNS = Warning("Function returns a value and also implicitly returns None")
111
- INCONSISTENT_RETURN_TYPE = Warning("Function return types are inconsistent")
112
- INCONSISTENT_TYPE = Warning("Variable (%s) already has types %s and set to %s")
113
- CODE_UNREACHABLE = Error("Code appears to be unreachable")
114
- CONSTANT_CONDITION = Warning("Using a conditional statement with a constant value (%s)")
115
- STRING_ITERATION = Warning("Iterating over a string (%s)")
116
- DONT_RETURN_NONE = Error("%s should not return None, raise an exception if not found")
117
- IS_LITERAL = Warning("Using is%s %s, may not always work")
118
- INVALID_FORMAT = Error("Invalid format string, problem starts near: '%s'")
119
- INVALID_FORMAT_COUNT = Error("Format string argument count (%d) doesn't match arguments (%d)")
120
- TOO_MANY_STARS_IN_FORMAT = Error("Too many *s in format flags")
121
- USING_STAR_IN_FORMAT_MAPPING = Error("Can't use * in formats when using a mapping (dictionary), near: '%s'")
122
- CANT_MIX_MAPPING_IN_FORMATS = Error("Can't mix tuple/mapping (dictionary) formats in same format string")
123
-
124
- INTEGER_DIVISION = Warning("Using integer division (%s / %s) may return integer or float")
125
- MODULO_1 = Warning("... % 1 may be constant")
126
- USING_TUPLE_ACCESS_TO_LIST = Error("Using a tuple instead of slice as list accessor for (%s)")
127
- BOOL_COMPARE = Warning("Comparisons with %s are not necessary and may not work as expected")
128
- SHOULDNT_ASSIGN_BUILTIN = Deprecated("Should not assign to %s, it is (or will be) a builtin")
129
- SHOULDNT_ASSIGN_NAME = Deprecated("Should not assign to %s, it is similar to builtin %s")
130
- SET_VAR_TO_ITSELF = Warning("Setting %s to itself has no effect")
131
- MODIFY_VAR_NOOP = Warning("%s %s %s has no effect")
132
- DIVIDE_VAR_BY_ITSELF = Warning("%s %s %s is always 1 or ZeroDivisionError")
133
- XOR_VAR_WITH_ITSELF = Warning("%s %s %s is always 0")
134
-
135
- STMT_WITH_NO_EFFECT = Error("Operator (%s) doesn't exist, statement has no effect")
136
- POSSIBLE_STMT_WITH_NO_EFFECT = Error("Statement appears to have no effect")
137
- UNARY_POSITIVE_HAS_NO_EFFECT = Error("Unary positive (+) usually has no effect")
138
- LIST_APPEND_ARGS = Error("[].append() only takes 1 argument in Python 1.6 and above for (%s)")
139
-
140
- LOCAL_DELETED = Error("(%s) cannot be used after being deleted on line %d")
141
- LOCAL_ALREADY_DELETED = Error("Local variable (%s) has already been deleted on line %d")
142
- VAR_DELETED_BEFORE_SET = Error("Variable (%s) deleted before being set")
143
-
144
- CATCH_BAD_EXCEPTION = Warning("Catching a non-Exception object (%s)")
145
- CATCH_STR_EXCEPTION = Deprecated("Catching string exceptions are deprecated (%s)")
146
- RAISE_BAD_EXCEPTION = Warning("Raising an exception on a non-Exception object (%s)")
147
- RAISE_STR_EXCEPTION = Deprecated("Raising string exceptions are deprecated (%s)")
148
- SET_EXCEPT_TO_BUILTIN = Error("Setting exception to builtin (%s), consider () around exceptions")
149
- USING_KEYWORD = Warning("Using identifier (%s) which will become a keyword in version %s")
150
- MODIFYING_DEFAULT_ARG = Warning("Modifying parameter (%s) with a default value may have unexpected consequences")
151
- USING_SELF_IN_REPR = Warning("Using `self` in __repr__ method")
152
- USING_NONE_RETURN_VALUE = Error("Using the return value from (%s) which is always None")
153
- WRONG_UNPACK_SIZE = Error("Unpacking %d values into %d variables")
154
- WRONG_UNPACK_FUNCTION = Error("Unpacking function (%s) which returns %d values into %d variables")
155
- UNPACK_NON_SEQUENCE = Error("Unpacking a non-sequence (%s) of type %s")
156
-
157
- NOT_SPECIAL_METHOD = Warning("%s is not a special method")
158
- USING_COERCE_IN_NEW_CLASS = Error("Using __coerce__ in new-style class (%s) will not work for binary operations")
159
- USING_NEW_STYLE_METHOD_IN_OLD_CLASS = Error("Using %s in old-style class (%s) does not work")
160
- USING_PROPERTIES_IN_CLASSIC_CLASS = Error("Using property (%s) in classic class %s may not work")
161
- USING_SLOTS_IN_CLASSIC_CLASS = Error("Using __slots__ in classic class %s has no effect, consider deriving from object")
162
- EMPTY_SLOTS = Warning("__slots__ are empty in %s")
163
-
164
- USES_EXEC = Security("Using the exec statement")
165
- USES_GLOBAL_EXEC = Security("Using the exec statement in global namespace")
166
- USES_INPUT = Security("Using input() is a security problem, consider using raw_input()")
167
-
168
- USING_DEPRECATED_MODULE = Deprecated("%s module is deprecated")
169
- USING_DEPRECATED_ATTR = Deprecated("%s is deprecated")
170
- USING_INSECURE_FUNC = Security("%s() is a security problem")
171
- USE_INSTEAD = ", consider using %s"
172
-
173
- USES_CONST_ATTR = Warning("Passing a constant string to %s, consider direct reference")
174
-
175
- BAD_STRING_FIND = Error("string.find() returns an integer, consider checking >= 0 or < 0 for not found")
Binary file
Binary file
@@ -1,275 +0,0 @@
1
- "Main module for running pychecker a Tkinter GUI for all the options"
2
-
3
- import sys
4
- import os
5
- import Tkinter, tkFileDialog
6
-
7
- from OptionTypes import *
8
- from string import capitalize, strip, rstrip, split
9
-
10
- import Config
11
-
12
- MAX_SUBBOX_ROWS = 8
13
- MAX_BOX_COLS = 3
14
- PAD = 10
15
- EDITOR = "xterm -e vi -n +%(line)d %(file)s"
16
- if sys.platform == 'win32':
17
- EDITOR = "notepad %(file)s"
18
-
19
- def col_weight(grid):
20
- "Set column weights so that sticky grid settings actually work"
21
- unused, col = grid.grid_size()
22
- for c in range(col):
23
- grid.columnconfigure(c, weight=1)
24
-
25
- def spawn(cmd_list):
26
- try:
27
- if os.fork():
28
- try:
29
- os.execvp(cmd_list[0], cmd_list)
30
- finally:
31
- sys.exit()
32
- except AttributeError:
33
- os.execvp(cmd_list[0], cmd_list)
34
-
35
- def edit(file, line):
36
- "Fire up an external editor to see the file at the given line"
37
- unused = file, line
38
- list = split(EDITOR)
39
- cmd_list = []
40
- for word in list:
41
- cmd_list.append(word % locals())
42
- spawn(cmd_list)
43
-
44
- def closeCB():
45
- sys.exit(0)
46
-
47
- class Results:
48
- "Display the warnings produced by checker"
49
-
50
- def __init__(self, w):
51
- self.top = Tkinter.Toplevel(w, name="results")
52
- self.top.transient(w)
53
- self.top.bind('<Return>', self.hide)
54
- self.top.bind('<Escape>', self.hide)
55
- self.text = Tkinter.Text(self.top, name="text")
56
- self.text.grid()
57
- self.text.bind('<Double-Button-1>', self.showFile)
58
- close = Tkinter.Button(self.top,
59
- name="close",
60
- default=Tkinter.ACTIVE,
61
- command=self.hide)
62
- close.grid()
63
- self.text.update_idletasks()
64
-
65
- def show(self, text):
66
- self.text.delete("0.1", "end")
67
- self.text.insert("0.1", text)
68
- self.top.deiconify()
69
- self.top.lift()
70
-
71
- def hide(self, *unused):
72
- self.top.withdraw()
73
-
74
- def line(self):
75
- return split(self.text.index(Tkinter.CURRENT), ".")[0]
76
-
77
- def showFile(self, unused):
78
- import re
79
- line = self.line()
80
- text = self.text.get(line + ".0", line + ".end")
81
- text = rstrip(text)
82
- result = re.search("(.*):([0-9]+):", text)
83
- if result:
84
- file, line = result.groups()
85
- edit(file, int(line))
86
- self.text.after(0, self.selectLine)
87
-
88
- def selectLine(self):
89
- line = self.line()
90
- self.text.tag_remove(Tkinter.SEL, "1.0", Tkinter.END)
91
- self.text.tag_add(Tkinter.SEL, line + ".0", line + ".end")
92
-
93
- class ConfigDialog:
94
- "Dialog for editing options"
95
-
96
- def __init__(self, tk):
97
- self._tk = tk
98
- self._cfg, _, _ = Config.setupFromArgs(sys.argv)
99
-
100
- self._help = None
101
- self._optMap = {}
102
- self._opts = []
103
- self._file = Tkinter.StringVar()
104
- self._results = None
105
-
106
- if len(sys.argv) > 1:
107
- self._file.set(sys.argv[1])
108
-
109
- for name, group in Config._OPTIONS:
110
- opts = []
111
- for _, useValue, longArg, member, description in group:
112
- value = None
113
- if member:
114
- value = getattr(self._cfg, member)
115
- description = member + ": " + capitalize(description)
116
- description = strip(description)
117
- tk.option_add('*' + longArg + ".help", description)
118
- if useValue:
119
- if type(value) == type([]):
120
- field = List(longArg, value)
121
- elif type(value) == type(1):
122
- field = Number(longArg, int(value))
123
- elif type(value) == type(''):
124
- field = Text(longArg, value)
125
- else:
126
- field = Boolean(longArg, value)
127
- else:
128
- field = Boolean(longArg, value)
129
- self._optMap[longArg] = field
130
- opts.append(field)
131
- self._opts.append( (name, opts))
132
-
133
- def _add_fields(self, w, opts):
134
- count = 0
135
- for opt in opts:
136
- f = opt.field(w)
137
- c, r = divmod(count, MAX_SUBBOX_ROWS)
138
- f.grid(row=r, column=c, sticky=Tkinter.NSEW)
139
- count = count + 1
140
-
141
- def _add_group(self, w, name, opts):
142
- colFrame = Tkinter.Frame(w)
143
-
144
- label = Tkinter.Label(colFrame, text=name + ":")
145
- label.grid(row=0, column=0, sticky=Tkinter.NSEW)
146
-
147
- gframe = Tkinter.Frame(colFrame, relief=Tkinter.GROOVE, borderwidth=2)
148
- gframe.grid(row=1, column=0, sticky=Tkinter.NSEW)
149
- self._add_fields(gframe, opts)
150
-
151
- label = Tkinter.Label(colFrame)
152
- label.grid(row=2, column=0, sticky=Tkinter.NSEW)
153
- colFrame.rowconfigure(2, weight=1)
154
- return colFrame
155
-
156
- def main(self):
157
- frame = Tkinter.Frame(self._tk, name="opts")
158
- frame.grid()
159
- self._tk.option_readfile('Options.ad')
160
- self._fields = {}
161
- row, col = 0, 0
162
- rowFrame = Tkinter.Frame(frame)
163
- rowFrame.grid(row=row)
164
- row = row + 1
165
- for name, opts in self._opts:
166
- w = self._add_group(rowFrame, name, opts)
167
- w.grid(row=row, column=col, sticky=Tkinter.NSEW, padx=PAD)
168
- col = col + 1
169
- if col >= MAX_BOX_COLS:
170
- col_weight(rowFrame)
171
- rowFrame=Tkinter.Frame(frame)
172
- rowFrame.grid(row=row, sticky=Tkinter.NSEW)
173
- col = 0
174
- row = row + 1
175
- col_weight(rowFrame)
176
-
177
- self._help = Tkinter.Label(self._tk, name="helpBox")
178
- self._help.grid(row=row)
179
- self._help.config(takefocus=0)
180
- buttons = Tkinter.Frame(self._tk, name="buttons")
181
- ok = Tkinter.Button(buttons, name="ok", command=self.ok, default=Tkinter.ACTIVE)
182
- ok.grid(row=row, column=0)
183
- default = Tkinter.Button(buttons, name="default", command=self.default)
184
- default.grid(row=row, column=1)
185
- close = Tkinter.Button(buttons, name="close", command=closeCB)
186
- close.grid(row=row, column=2)
187
- buttons.grid()
188
-
189
- f = Tkinter.Frame(self._tk, name="fileStuff")
190
- Tkinter.Button(f, name="getfile", command=self.file).grid(row=0, column=1)
191
- fileEntry = Tkinter.Entry(f, name="fname", textvariable=self._file)
192
- fileEntry.grid(row=0, column=2)
193
- Tkinter.Button(f, name="check", command=self.check).grid(row=0, column=3)
194
- f.grid(sticky=Tkinter.EW)
195
-
196
- self._tk.bind_all('<FocusIn>', self.focus)
197
- self._tk.bind_all('<Enter>', self.focus)
198
- self._tk.bind_all('<ButtonPress>', self.click)
199
- fileEntry.bind('<Return>', self.check)
200
- self._tk.mainloop()
201
-
202
- #
203
- # Callbacks
204
- #
205
-
206
- def help(self, w):
207
- if type(w) == type(''): # occurs with file dialog...
208
- return
209
- if self._help == w: # ignore help events on help...
210
- return
211
- help = w.option_get("help", "help")
212
- self._help.configure(text=help)
213
-
214
- def focus(self, ev):
215
- self.help(ev.widget)
216
-
217
- def click(self, ev):
218
- self.help(ev.widget)
219
-
220
- def ok(self):
221
- opts = []
222
- # Pull command-line args
223
- for _, group in self._opts:
224
- for opt in group:
225
- arg = opt.arg()
226
- if arg:
227
- opts.append(arg)
228
-
229
- # Calculate config
230
- self._cfg, _, _ = Config.setupFromArgs(opts)
231
-
232
- # Set controls based on new config
233
- for _, group in Config._OPTIONS:
234
- for _, _, longArg, member, _ in group:
235
- if member:
236
- self._optMap[longArg].set(getattr(self._cfg, member))
237
-
238
- def default(self):
239
- self._cfg, _, _ = Config.setupFromArgs(sys.argv)
240
- for _, group in Config._OPTIONS:
241
- for _, _, longArg, member, _ in group:
242
- if member:
243
- self._optMap[longArg].set(getattr(self._cfg, member))
244
- else:
245
- self._optMap[longArg].set(0)
246
-
247
- def file(self):
248
- self._file.set(tkFileDialog.askopenfilename())
249
-
250
- def check(self, *unused):
251
- import checker
252
- import StringIO
253
-
254
- self.ok() # show effect of all settings
255
-
256
- checker._allModules = {}
257
- warnings = checker.getWarnings([self._file.get()], self._cfg)
258
- capture = StringIO.StringIO()
259
-
260
- if not self._results:
261
- self._results = Results(self._help)
262
- checker._printWarnings(warnings, capture)
263
-
264
- value = strip(capture.getvalue())
265
- if not value:
266
- value = "None"
267
- self._results.show(value)
268
-
269
-
270
- if __name__=='__main__':
271
- dirs = os.path.join(os.path.split(os.getcwd())[:-1])
272
- sys.path.append(dirs[0])
273
- tk = Tkinter.Tk()
274
- tk.title('PyChecker')
275
- ConfigDialog(tk).main()
Binary file
Binary file
@@ -1,19 +0,0 @@
1
- """
2
- Track loaded PyCheckerModules together with the directory they were loaded from.
3
- This allows us to differentiate between loaded modules with the same name
4
- but from different paths, in a way that sys.modules doesn't do.
5
- """
6
-
7
- __pcmodules = {}
8
-
9
- def getPCModule(moduleName, moduleDir=None):
10
- global __pcmodules
11
- return __pcmodules.get((moduleName, moduleDir), None)
12
-
13
- def getPCModules():
14
- global __pcmodules
15
- return __pcmodules.values()
16
-
17
- def addPCModule(pcmodule):
18
- global __pcmodules
19
- __pcmodules[(pcmodule.moduleName, pcmodule.moduleDir)] = pcmodule
Binary file
Binary file