bee_python 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/{build/README → README} +1 -1
- data/egg/egg/build.yml +11 -49
- data/egg/egg.yml +19 -27
- data/egg/http/build.erb +32 -36
- data/egg/http/libhttp.py +102 -0
- data/egg/http/pylint.cfg +236 -0
- data/egg/http/server.py +7 -0
- data/egg/http/test.erb +32 -0
- data/egg/http.yml +33 -29
- data/egg/mysql/mysql.py +8 -9
- data/egg/project/build.erb +21 -53
- data/egg/project/pylint.cfg +236 -0
- data/egg/project/test.py +2 -2
- data/egg/project.yml +23 -31
- data/egg/script/build.erb +18 -23
- data/egg/script/pylint.cfg +236 -0
- data/egg/script.yml +22 -18
- data/egg/source/source.py +6 -6
- data/egg/test/test.py +1 -1
- data/lib/bee_task_python.rb +3 -34
- data/python.yml +123 -0
- metadata +61 -503
- data/test/build.yml +0 -16
- data/test/tc_bee_task_python.rb +0 -27
- data/test/test_build.rb +0 -26
- data/test/test_build_listener.rb +0 -110
- data/test/ts_bee_python.rb +0 -26
- data/tools/common/__init__.py +0 -5
- data/tools/common/common/__init__.py +0 -140
- data/tools/common/common/__pkginfo__.py +0 -43
- data/tools/common/common/adbh.py +0 -35
- data/tools/common/common/cache.py +0 -114
- data/tools/common/common/changelog.py +0 -234
- data/tools/common/common/clcommands.py +0 -181
- data/tools/common/common/cli.py +0 -212
- data/tools/common/common/compat.py +0 -328
- data/tools/common/common/configuration.py +0 -1087
- data/tools/common/common/contexts.py +0 -58
- data/tools/common/common/corbautils.py +0 -117
- data/tools/common/common/daemon.py +0 -171
- data/tools/common/common/date.py +0 -279
- data/tools/common/common/db.py +0 -49
- data/tools/common/common/dbf.py +0 -229
- data/tools/common/common/debugger.py +0 -208
- data/tools/common/common/decorators.py +0 -190
- data/tools/common/common/deprecation.py +0 -118
- data/tools/common/common/fileutils.py +0 -409
- data/tools/common/common/graph.py +0 -259
- data/tools/common/common/html.py +0 -142
- data/tools/common/common/interface.py +0 -76
- data/tools/common/common/logging_ext.py +0 -166
- data/tools/common/common/modutils.py +0 -670
- data/tools/common/common/optik_ext.py +0 -383
- data/tools/common/common/optparser.py +0 -92
- data/tools/common/common/pdf_ext.py +0 -111
- data/tools/common/common/proc.py +0 -276
- data/tools/common/common/pyro_ext.py +0 -146
- data/tools/common/common/pytest.py +0 -754
- data/tools/common/common/shellutils.py +0 -383
- data/tools/common/common/sphinx_ext.py +0 -87
- data/tools/common/common/sphinxutils.py +0 -122
- data/tools/common/common/sqlgen.py +0 -31
- data/tools/common/common/table.py +0 -930
- data/tools/common/common/tasksqueue.py +0 -97
- data/tools/common/common/test/__init__.py +0 -1
- data/tools/common/common/test/data/ChangeLog +0 -184
- data/tools/common/common/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
- data/tools/common/common/test/data/__init__.py +0 -1
- data/tools/common/common/test/data/content_differ_dir/NOTHING +0 -0
- data/tools/common/common/test/data/content_differ_dir/README +0 -1
- data/tools/common/common/test/data/content_differ_dir/subdir/coin +0 -1
- data/tools/common/common/test/data/content_differ_dir/subdir/toto.txt +0 -53
- data/tools/common/common/test/data/file_differ_dir/NOTHING +0 -0
- data/tools/common/common/test/data/file_differ_dir/README +0 -1
- data/tools/common/common/test/data/file_differ_dir/subdir/toto.txt +0 -53
- data/tools/common/common/test/data/file_differ_dir/subdirtwo/Hello +0 -0
- data/tools/common/common/test/data/find_test/__init__.py +0 -0
- data/tools/common/common/test/data/find_test/foo.txt +0 -0
- data/tools/common/common/test/data/find_test/module.py +0 -0
- data/tools/common/common/test/data/find_test/module2.py +0 -0
- data/tools/common/common/test/data/find_test/newlines.txt +0 -0
- data/tools/common/common/test/data/find_test/noendingnewline.py +0 -0
- data/tools/common/common/test/data/find_test/nonregr.py +0 -0
- data/tools/common/common/test/data/find_test/normal_file.txt +0 -0
- data/tools/common/common/test/data/find_test/spam.txt +0 -0
- data/tools/common/common/test/data/find_test/sub/doc.txt +0 -0
- data/tools/common/common/test/data/find_test/sub/momo.py +0 -0
- data/tools/common/common/test/data/find_test/test.ini +0 -0
- data/tools/common/common/test/data/find_test/test1.msg +0 -0
- data/tools/common/common/test/data/find_test/test2.msg +0 -0
- data/tools/common/common/test/data/find_test/write_protected_file.txt +0 -0
- data/tools/common/common/test/data/foo.txt +0 -9
- data/tools/common/common/test/data/module.py +0 -88
- data/tools/common/common/test/data/module2.py +0 -77
- data/tools/common/common/test/data/newlines.txt +0 -3
- data/tools/common/common/test/data/noendingnewline.py +0 -36
- data/tools/common/common/test/data/nonregr.py +0 -14
- data/tools/common/common/test/data/normal_file.txt +0 -0
- data/tools/common/common/test/data/reference_dir/NOTHING +0 -0
- data/tools/common/common/test/data/reference_dir/README +0 -1
- data/tools/common/common/test/data/reference_dir/subdir/coin +0 -1
- data/tools/common/common/test/data/reference_dir/subdir/toto.txt +0 -53
- data/tools/common/common/test/data/same_dir/NOTHING +0 -0
- data/tools/common/common/test/data/same_dir/README +0 -1
- data/tools/common/common/test/data/same_dir/subdir/coin +0 -1
- data/tools/common/common/test/data/same_dir/subdir/toto.txt +0 -53
- data/tools/common/common/test/data/spam.txt +0 -9
- data/tools/common/common/test/data/sub/doc.txt +0 -1
- data/tools/common/common/test/data/sub/momo.py +0 -1
- data/tools/common/common/test/data/subdir_differ_dir/NOTHING +0 -0
- data/tools/common/common/test/data/subdir_differ_dir/README +0 -1
- data/tools/common/common/test/data/subdir_differ_dir/subdir/coin +0 -1
- data/tools/common/common/test/data/subdir_differ_dir/subdir/toto.txt +0 -53
- data/tools/common/common/test/data/test.ini +0 -20
- data/tools/common/common/test/data/test1.msg +0 -30
- data/tools/common/common/test/data/test2.msg +0 -42
- data/tools/common/common/test/data/write_protected_file.txt +0 -0
- data/tools/common/common/test/foomod.py +0 -17
- data/tools/common/common/test/unittest_cache.py +0 -129
- data/tools/common/common/test/unittest_changelog.py +0 -37
- data/tools/common/common/test/unittest_compat.py +0 -239
- data/tools/common/common/test/unittest_configuration.py +0 -348
- data/tools/common/common/test/unittest_date.py +0 -154
- data/tools/common/common/test/unittest_decorators.py +0 -62
- data/tools/common/common/test/unittest_deprecation.py +0 -76
- data/tools/common/common/test/unittest_fileutils.py +0 -133
- data/tools/common/common/test/unittest_graph.py +0 -50
- data/tools/common/common/test/unittest_html.py +0 -76
- data/tools/common/common/test/unittest_interface.py +0 -87
- data/tools/common/common/test/unittest_modutils.py +0 -244
- data/tools/common/common/test/unittest_pytest.py +0 -50
- data/tools/common/common/test/unittest_shellutils.py +0 -248
- data/tools/common/common/test/unittest_table.py +0 -448
- data/tools/common/common/test/unittest_taskqueue.py +0 -71
- data/tools/common/common/test/unittest_testlib.py +0 -956
- data/tools/common/common/test/unittest_textutils.py +0 -247
- data/tools/common/common/test/unittest_tree.py +0 -248
- data/tools/common/common/test/unittest_umessage.py +0 -55
- data/tools/common/common/test/unittest_ureports_html.py +0 -64
- data/tools/common/common/test/unittest_ureports_text.py +0 -105
- data/tools/common/common/test/unittest_xmlutils.py +0 -75
- data/tools/common/common/test/utils.py +0 -87
- data/tools/common/common/testlib.py +0 -1927
- data/tools/common/common/textutils.py +0 -476
- data/tools/common/common/tree.py +0 -372
- data/tools/common/common/umessage.py +0 -161
- data/tools/common/common/ureports/__init__.py +0 -174
- data/tools/common/common/ureports/docbook_writer.py +0 -139
- data/tools/common/common/ureports/html_writer.py +0 -131
- data/tools/common/common/ureports/nodes.py +0 -201
- data/tools/common/common/ureports/text_writer.py +0 -140
- data/tools/common/common/vcgutils.py +0 -216
- data/tools/common/common/visitor.py +0 -107
- data/tools/common/common/xmlrpcutils.py +0 -136
- data/tools/common/common/xmlutils.py +0 -61
- data/tools/coverage/coverage.py +0 -602
- data/tools/epydoc/__init__.py +0 -227
- data/tools/epydoc/__init__.pyc +0 -0
- data/tools/epydoc/apidoc.py +0 -2203
- data/tools/epydoc/apidoc.pyc +0 -0
- data/tools/epydoc/checker.py +0 -349
- data/tools/epydoc/checker.pyc +0 -0
- data/tools/epydoc/cli.py +0 -1470
- data/tools/epydoc/cli.pyc +0 -0
- data/tools/epydoc/compat.py +0 -250
- data/tools/epydoc/compat.pyc +0 -0
- data/tools/epydoc/docbuilder.py +0 -1358
- data/tools/epydoc/docbuilder.pyc +0 -0
- data/tools/epydoc/docintrospecter.py +0 -1056
- data/tools/epydoc/docintrospecter.pyc +0 -0
- data/tools/epydoc/docparser.py +0 -2113
- data/tools/epydoc/docparser.pyc +0 -0
- data/tools/epydoc/docstringparser.py +0 -1111
- data/tools/epydoc/docstringparser.pyc +0 -0
- data/tools/epydoc/docwriter/__init__.py +0 -12
- data/tools/epydoc/docwriter/__init__.pyc +0 -0
- data/tools/epydoc/docwriter/dotgraph.py +0 -1351
- data/tools/epydoc/docwriter/dotgraph.pyc +0 -0
- data/tools/epydoc/docwriter/html.py +0 -3491
- data/tools/epydoc/docwriter/html.pyc +0 -0
- data/tools/epydoc/docwriter/html_colorize.py +0 -909
- data/tools/epydoc/docwriter/html_colorize.pyc +0 -0
- data/tools/epydoc/docwriter/html_css.py +0 -550
- data/tools/epydoc/docwriter/html_css.pyc +0 -0
- data/tools/epydoc/docwriter/html_help.py +0 -190
- data/tools/epydoc/docwriter/html_help.pyc +0 -0
- data/tools/epydoc/docwriter/latex.py +0 -1187
- data/tools/epydoc/docwriter/latex.pyc +0 -0
- data/tools/epydoc/docwriter/plaintext.py +0 -276
- data/tools/epydoc/docwriter/plaintext.pyc +0 -0
- data/tools/epydoc/docwriter/xlink.py +0 -505
- data/tools/epydoc/docwriter/xlink.pyc +0 -0
- data/tools/epydoc/gui.py +0 -1148
- data/tools/epydoc/gui.pyc +0 -0
- data/tools/epydoc/log.py +0 -204
- data/tools/epydoc/log.pyc +0 -0
- data/tools/epydoc/markup/__init__.py +0 -623
- data/tools/epydoc/markup/__init__.pyc +0 -0
- data/tools/epydoc/markup/doctest.py +0 -311
- data/tools/epydoc/markup/doctest.pyc +0 -0
- data/tools/epydoc/markup/epytext.py +0 -2116
- data/tools/epydoc/markup/epytext.pyc +0 -0
- data/tools/epydoc/markup/javadoc.py +0 -250
- data/tools/epydoc/markup/javadoc.pyc +0 -0
- data/tools/epydoc/markup/plaintext.py +0 -78
- data/tools/epydoc/markup/plaintext.pyc +0 -0
- data/tools/epydoc/markup/pyval_repr.py +0 -532
- data/tools/epydoc/markup/pyval_repr.pyc +0 -0
- data/tools/epydoc/markup/restructuredtext.py +0 -906
- data/tools/epydoc/markup/restructuredtext.pyc +0 -0
- data/tools/epydoc/test/__init__.py +0 -97
- data/tools/epydoc/test/__init__.pyc +0 -0
- data/tools/epydoc/test/util.py +0 -226
- data/tools/epydoc/test/util.pyc +0 -0
- data/tools/epydoc/util.py +0 -289
- data/tools/epydoc/util.pyc +0 -0
- data/tools/logilab/logilab/__init__.py +0 -5
- data/tools/logilab/logilab/astng/__init__.py +0 -82
- data/tools/logilab/logilab/astng/__pkginfo__.py +0 -76
- data/tools/logilab/logilab/astng/_exceptions.py +0 -64
- data/tools/logilab/logilab/astng/_nodes_ast.py +0 -667
- data/tools/logilab/logilab/astng/_nodes_compiler.py +0 -758
- data/tools/logilab/logilab/astng/bases.py +0 -608
- data/tools/logilab/logilab/astng/builder.py +0 -239
- data/tools/logilab/logilab/astng/inference.py +0 -426
- data/tools/logilab/logilab/astng/inspector.py +0 -289
- data/tools/logilab/logilab/astng/manager.py +0 -421
- data/tools/logilab/logilab/astng/mixins.py +0 -165
- data/tools/logilab/logilab/astng/node_classes.py +0 -848
- data/tools/logilab/logilab/astng/nodes.py +0 -85
- data/tools/logilab/logilab/astng/nodes_as_string.py +0 -389
- data/tools/logilab/logilab/astng/patchcomptransformer.py +0 -159
- data/tools/logilab/logilab/astng/protocols.py +0 -333
- data/tools/logilab/logilab/astng/raw_building.py +0 -212
- data/tools/logilab/logilab/astng/rebuilder.py +0 -307
- data/tools/logilab/logilab/astng/scoped_nodes.py +0 -951
- data/tools/logilab/logilab/astng/test/__init__.py +0 -19
- data/tools/logilab/logilab/astng/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
- data/tools/logilab/logilab/astng/test/data/MyPyPa-0.1.0-py2.5.zip +0 -0
- data/tools/logilab/logilab/astng/test/data/SSL1/Connection1.py +0 -33
- data/tools/logilab/logilab/astng/test/data/SSL1/__init__.py +0 -20
- data/tools/logilab/logilab/astng/test/data/__init__.py +0 -20
- data/tools/logilab/logilab/astng/test/data/all.py +0 -29
- data/tools/logilab/logilab/astng/test/data/appl/__init__.py +0 -23
- data/tools/logilab/logilab/astng/test/data/appl/myConnection.py +0 -30
- data/tools/logilab/logilab/astng/test/data/format.py +0 -34
- data/tools/logilab/logilab/astng/test/data/module.py +0 -90
- data/tools/logilab/logilab/astng/test/data/module2.py +0 -112
- data/tools/logilab/logilab/astng/test/data/noendingnewline.py +0 -57
- data/tools/logilab/logilab/astng/test/data/nonregr.py +0 -76
- data/tools/logilab/logilab/astng/test/data/notall.py +0 -28
- data/tools/logilab/logilab/astng/test/data2/__init__.py +0 -20
- data/tools/logilab/logilab/astng/test/data2/clientmodule_test.py +0 -51
- data/tools/logilab/logilab/astng/test/data2/suppliermodule_test.py +0 -32
- data/tools/logilab/logilab/astng/test/regrtest.py +0 -135
- data/tools/logilab/logilab/astng/test/regrtest_data/absimport.py +0 -22
- data/tools/logilab/logilab/astng/test/regrtest_data/descriptor_crash.py +0 -31
- data/tools/logilab/logilab/astng/test/regrtest_data/import_package_subpackage_module.py +0 -68
- data/tools/logilab/logilab/astng/test/regrtest_data/package/__init__.py +0 -24
- data/tools/logilab/logilab/astng/test/regrtest_data/package/subpackage/__init__.py +0 -20
- data/tools/logilab/logilab/astng/test/regrtest_data/package/subpackage/module.py +0 -20
- data/tools/logilab/logilab/astng/test/unittest_builder.py +0 -684
- data/tools/logilab/logilab/astng/test/unittest_inference.py +0 -1112
- data/tools/logilab/logilab/astng/test/unittest_inspector.py +0 -105
- data/tools/logilab/logilab/astng/test/unittest_lookup.py +0 -302
- data/tools/logilab/logilab/astng/test/unittest_manager.py +0 -98
- data/tools/logilab/logilab/astng/test/unittest_nodes.py +0 -302
- data/tools/logilab/logilab/astng/test/unittest_scoped_nodes.py +0 -501
- data/tools/logilab/logilab/astng/test/unittest_utils.py +0 -104
- data/tools/logilab/logilab/astng/utils.py +0 -342
- data/tools/logilab/logilab/common/__init__.py +0 -140
- data/tools/logilab/logilab/common/__pkginfo__.py +0 -43
- data/tools/logilab/logilab/common/adbh.py +0 -35
- data/tools/logilab/logilab/common/cache.py +0 -114
- data/tools/logilab/logilab/common/changelog.py +0 -234
- data/tools/logilab/logilab/common/clcommands.py +0 -181
- data/tools/logilab/logilab/common/cli.py +0 -212
- data/tools/logilab/logilab/common/compat.py +0 -328
- data/tools/logilab/logilab/common/configuration.py +0 -1087
- data/tools/logilab/logilab/common/contexts.py +0 -58
- data/tools/logilab/logilab/common/corbautils.py +0 -117
- data/tools/logilab/logilab/common/daemon.py +0 -171
- data/tools/logilab/logilab/common/date.py +0 -279
- data/tools/logilab/logilab/common/db.py +0 -49
- data/tools/logilab/logilab/common/dbf.py +0 -229
- data/tools/logilab/logilab/common/debugger.py +0 -208
- data/tools/logilab/logilab/common/decorators.py +0 -190
- data/tools/logilab/logilab/common/deprecation.py +0 -118
- data/tools/logilab/logilab/common/fileutils.py +0 -409
- data/tools/logilab/logilab/common/graph.py +0 -259
- data/tools/logilab/logilab/common/html.py +0 -142
- data/tools/logilab/logilab/common/interface.py +0 -76
- data/tools/logilab/logilab/common/logging_ext.py +0 -166
- data/tools/logilab/logilab/common/modutils.py +0 -670
- data/tools/logilab/logilab/common/optik_ext.py +0 -383
- data/tools/logilab/logilab/common/optparser.py +0 -92
- data/tools/logilab/logilab/common/pdf_ext.py +0 -111
- data/tools/logilab/logilab/common/proc.py +0 -276
- data/tools/logilab/logilab/common/pyro_ext.py +0 -146
- data/tools/logilab/logilab/common/pytest.py +0 -754
- data/tools/logilab/logilab/common/shellutils.py +0 -383
- data/tools/logilab/logilab/common/sphinx_ext.py +0 -87
- data/tools/logilab/logilab/common/sphinxutils.py +0 -122
- data/tools/logilab/logilab/common/sqlgen.py +0 -31
- data/tools/logilab/logilab/common/table.py +0 -930
- data/tools/logilab/logilab/common/tasksqueue.py +0 -97
- data/tools/logilab/logilab/common/test/__init__.py +0 -1
- data/tools/logilab/logilab/common/test/data/ChangeLog +0 -184
- data/tools/logilab/logilab/common/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
- data/tools/logilab/logilab/common/test/data/__init__.py +0 -1
- data/tools/logilab/logilab/common/test/data/content_differ_dir/NOTHING +0 -0
- data/tools/logilab/logilab/common/test/data/content_differ_dir/README +0 -1
- data/tools/logilab/logilab/common/test/data/content_differ_dir/subdir/coin +0 -1
- data/tools/logilab/logilab/common/test/data/content_differ_dir/subdir/toto.txt +0 -53
- data/tools/logilab/logilab/common/test/data/file_differ_dir/NOTHING +0 -0
- data/tools/logilab/logilab/common/test/data/file_differ_dir/README +0 -1
- data/tools/logilab/logilab/common/test/data/file_differ_dir/subdir/toto.txt +0 -53
- data/tools/logilab/logilab/common/test/data/file_differ_dir/subdirtwo/Hello +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/__init__.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/foo.txt +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/module.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/module2.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/newlines.txt +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/noendingnewline.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/nonregr.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/normal_file.txt +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/spam.txt +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/sub/doc.txt +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/sub/momo.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/test.ini +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/test1.msg +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/test2.msg +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/write_protected_file.txt +0 -0
- data/tools/logilab/logilab/common/test/data/foo.txt +0 -9
- data/tools/logilab/logilab/common/test/data/module.py +0 -88
- data/tools/logilab/logilab/common/test/data/module2.py +0 -77
- data/tools/logilab/logilab/common/test/data/newlines.txt +0 -3
- data/tools/logilab/logilab/common/test/data/noendingnewline.py +0 -36
- data/tools/logilab/logilab/common/test/data/nonregr.py +0 -14
- data/tools/logilab/logilab/common/test/data/normal_file.txt +0 -0
- data/tools/logilab/logilab/common/test/data/reference_dir/NOTHING +0 -0
- data/tools/logilab/logilab/common/test/data/reference_dir/README +0 -1
- data/tools/logilab/logilab/common/test/data/reference_dir/subdir/coin +0 -1
- data/tools/logilab/logilab/common/test/data/reference_dir/subdir/toto.txt +0 -53
- data/tools/logilab/logilab/common/test/data/same_dir/NOTHING +0 -0
- data/tools/logilab/logilab/common/test/data/same_dir/README +0 -1
- data/tools/logilab/logilab/common/test/data/same_dir/subdir/coin +0 -1
- data/tools/logilab/logilab/common/test/data/same_dir/subdir/toto.txt +0 -53
- data/tools/logilab/logilab/common/test/data/spam.txt +0 -9
- data/tools/logilab/logilab/common/test/data/sub/doc.txt +0 -1
- data/tools/logilab/logilab/common/test/data/sub/momo.py +0 -1
- data/tools/logilab/logilab/common/test/data/subdir_differ_dir/NOTHING +0 -0
- data/tools/logilab/logilab/common/test/data/subdir_differ_dir/README +0 -1
- data/tools/logilab/logilab/common/test/data/subdir_differ_dir/subdir/coin +0 -1
- data/tools/logilab/logilab/common/test/data/subdir_differ_dir/subdir/toto.txt +0 -53
- data/tools/logilab/logilab/common/test/data/test.ini +0 -20
- data/tools/logilab/logilab/common/test/data/test1.msg +0 -30
- data/tools/logilab/logilab/common/test/data/test2.msg +0 -42
- data/tools/logilab/logilab/common/test/data/write_protected_file.txt +0 -0
- data/tools/logilab/logilab/common/test/foomod.py +0 -17
- data/tools/logilab/logilab/common/test/unittest_cache.py +0 -129
- data/tools/logilab/logilab/common/test/unittest_changelog.py +0 -37
- data/tools/logilab/logilab/common/test/unittest_compat.py +0 -239
- data/tools/logilab/logilab/common/test/unittest_configuration.py +0 -348
- data/tools/logilab/logilab/common/test/unittest_date.py +0 -154
- data/tools/logilab/logilab/common/test/unittest_decorators.py +0 -62
- data/tools/logilab/logilab/common/test/unittest_deprecation.py +0 -76
- data/tools/logilab/logilab/common/test/unittest_fileutils.py +0 -133
- data/tools/logilab/logilab/common/test/unittest_graph.py +0 -50
- data/tools/logilab/logilab/common/test/unittest_html.py +0 -76
- data/tools/logilab/logilab/common/test/unittest_interface.py +0 -87
- data/tools/logilab/logilab/common/test/unittest_modutils.py +0 -244
- data/tools/logilab/logilab/common/test/unittest_pytest.py +0 -50
- data/tools/logilab/logilab/common/test/unittest_shellutils.py +0 -248
- data/tools/logilab/logilab/common/test/unittest_table.py +0 -448
- data/tools/logilab/logilab/common/test/unittest_taskqueue.py +0 -71
- data/tools/logilab/logilab/common/test/unittest_testlib.py +0 -956
- data/tools/logilab/logilab/common/test/unittest_textutils.py +0 -247
- data/tools/logilab/logilab/common/test/unittest_tree.py +0 -248
- data/tools/logilab/logilab/common/test/unittest_umessage.py +0 -55
- data/tools/logilab/logilab/common/test/unittest_ureports_html.py +0 -64
- data/tools/logilab/logilab/common/test/unittest_ureports_text.py +0 -105
- data/tools/logilab/logilab/common/test/unittest_xmlutils.py +0 -75
- data/tools/logilab/logilab/common/test/utils.py +0 -87
- data/tools/logilab/logilab/common/testlib.py +0 -1927
- data/tools/logilab/logilab/common/textutils.py +0 -476
- data/tools/logilab/logilab/common/tree.py +0 -372
- data/tools/logilab/logilab/common/umessage.py +0 -161
- data/tools/logilab/logilab/common/ureports/__init__.py +0 -174
- data/tools/logilab/logilab/common/ureports/docbook_writer.py +0 -139
- data/tools/logilab/logilab/common/ureports/html_writer.py +0 -131
- data/tools/logilab/logilab/common/ureports/nodes.py +0 -201
- data/tools/logilab/logilab/common/ureports/text_writer.py +0 -140
- data/tools/logilab/logilab/common/vcgutils.py +0 -216
- data/tools/logilab/logilab/common/visitor.py +0 -107
- data/tools/logilab/logilab/common/xmlrpcutils.py +0 -136
- data/tools/logilab/logilab/common/xmlutils.py +0 -61
- data/tools/pychecker/COPYRIGHT +0 -31
- data/tools/pychecker/ChangeLog +0 -349
- data/tools/pychecker/CodeChecks.py +0 -1969
- data/tools/pychecker/CodeChecks.pyc +0 -0
- data/tools/pychecker/CodeChecks.pyo +0 -0
- data/tools/pychecker/Config.py +0 -475
- data/tools/pychecker/Config.pyc +0 -0
- data/tools/pychecker/Config.pyo +0 -0
- data/tools/pychecker/KNOWN_BUGS +0 -100
- data/tools/pychecker/MAINTAINERS +0 -81
- data/tools/pychecker/NEWS +0 -406
- data/tools/pychecker/OP.py +0 -131
- data/tools/pychecker/OP.pyc +0 -0
- data/tools/pychecker/OP.pyo +0 -0
- data/tools/pychecker/OptionTypes.py +0 -117
- data/tools/pychecker/OptionTypes.pyc +0 -0
- data/tools/pychecker/OptionTypes.pyo +0 -0
- data/tools/pychecker/README +0 -152
- data/tools/pychecker/Stack.py +0 -115
- data/tools/pychecker/Stack.pyc +0 -0
- data/tools/pychecker/Stack.pyo +0 -0
- data/tools/pychecker/TODO +0 -101
- data/tools/pychecker/VERSION +0 -1
- data/tools/pychecker/Warning.py +0 -50
- data/tools/pychecker/Warning.pyc +0 -0
- data/tools/pychecker/Warning.pyo +0 -0
- data/tools/pychecker/__init__.py +0 -17
- data/tools/pychecker/__init__.pyc +0 -0
- data/tools/pychecker/__init__.pyo +0 -0
- data/tools/pychecker/checker.py +0 -961
- data/tools/pychecker/checker.pyc +0 -0
- data/tools/pychecker/checker.pyo +0 -0
- data/tools/pychecker/function.py +0 -159
- data/tools/pychecker/function.pyc +0 -0
- data/tools/pychecker/function.pyo +0 -0
- data/tools/pychecker/msgs.py +0 -175
- data/tools/pychecker/msgs.pyc +0 -0
- data/tools/pychecker/msgs.pyo +0 -0
- data/tools/pychecker/options.py +0 -275
- data/tools/pychecker/options.pyc +0 -0
- data/tools/pychecker/options.pyo +0 -0
- data/tools/pychecker/pcmodules.py +0 -19
- data/tools/pychecker/pcmodules.pyc +0 -0
- data/tools/pychecker/pcmodules.pyo +0 -0
- data/tools/pychecker/printer.py +0 -47
- data/tools/pychecker/printer.pyc +0 -0
- data/tools/pychecker/printer.pyo +0 -0
- data/tools/pychecker/python.py +0 -427
- data/tools/pychecker/python.pyc +0 -0
- data/tools/pychecker/python.pyo +0 -0
- data/tools/pychecker/utils.py +0 -102
- data/tools/pychecker/utils.pyc +0 -0
- data/tools/pychecker/utils.pyo +0 -0
- data/tools/pychecker/warn.py +0 -778
- data/tools/pychecker/warn.pyc +0 -0
- data/tools/pychecker/warn.pyo +0 -0
- data/tools/pylint2/pylint/__init__.py +0 -16
- data/tools/pylint2/pylint/__pkginfo__.py +0 -67
- data/tools/pylint2/pylint/checkers/__init__.py +0 -155
- data/tools/pylint2/pylint/checkers/base.py +0 -749
- data/tools/pylint2/pylint/checkers/classes.py +0 -527
- data/tools/pylint2/pylint/checkers/design_analysis.py +0 -344
- data/tools/pylint2/pylint/checkers/exceptions.py +0 -183
- data/tools/pylint2/pylint/checkers/format.py +0 -367
- data/tools/pylint2/pylint/checkers/imports.py +0 -379
- data/tools/pylint2/pylint/checkers/logging.py +0 -98
- data/tools/pylint2/pylint/checkers/misc.py +0 -128
- data/tools/pylint2/pylint/checkers/newstyle.py +0 -107
- data/tools/pylint2/pylint/checkers/raw_metrics.py +0 -125
- data/tools/pylint2/pylint/checkers/similar.py +0 -333
- data/tools/pylint2/pylint/checkers/string_format.py +0 -239
- data/tools/pylint2/pylint/checkers/typecheck.py +0 -364
- data/tools/pylint2/pylint/checkers/utils.py +0 -208
- data/tools/pylint2/pylint/checkers/variables.py +0 -498
- data/tools/pylint2/pylint/config.py +0 -149
- data/tools/pylint2/pylint/epylint.py +0 -149
- data/tools/pylint2/pylint/gui.py +0 -433
- data/tools/pylint2/pylint/interfaces.py +0 -98
- data/tools/pylint2/pylint/lint.py +0 -914
- data/tools/pylint2/pylint/pyreverse/__init__.py +0 -5
- data/tools/pylint2/pylint/pyreverse/diadefslib.py +0 -229
- data/tools/pylint2/pylint/pyreverse/diagrams.py +0 -247
- data/tools/pylint2/pylint/pyreverse/main.py +0 -123
- data/tools/pylint2/pylint/pyreverse/utils.py +0 -131
- data/tools/pylint2/pylint/pyreverse/writer.py +0 -196
- data/tools/pylint2/pylint/reporters/__init__.py +0 -67
- data/tools/pylint2/pylint/reporters/guireporter.py +0 -36
- data/tools/pylint2/pylint/reporters/html.py +0 -69
- data/tools/pylint2/pylint/reporters/text.py +0 -156
- data/tools/pylint2/pylint/utils.py +0 -518
- data/tools/pylint2/pylint.py +0 -16
data/tools/pychecker/checker.pyc
DELETED
Binary file
|
data/tools/pychecker/checker.pyo
DELETED
Binary file
|
data/tools/pychecker/function.py
DELETED
@@ -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
|
data/tools/pychecker/msgs.py
DELETED
@@ -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")
|
data/tools/pychecker/msgs.pyc
DELETED
Binary file
|
data/tools/pychecker/msgs.pyo
DELETED
Binary file
|
data/tools/pychecker/options.py
DELETED
@@ -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()
|
data/tools/pychecker/options.pyc
DELETED
Binary file
|
data/tools/pychecker/options.pyo
DELETED
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
|