Hi folks,

For the first time I'm playing with the "-c" argument to test.py.
Thought it would be nice to get some pychecker output on the Products
I'm working on.

Is there any way to reduce the scope of what pychecker checks?
Or does it inevitably walk through the whole import tree?
Has anybody actually found the -c option useful?
Any tips on using pychecker effectively for product development?

Aside from the fact that it's bothersome to deal with the output,
because pychecker  wants to spew commentary on every little wart in the
entire Zope codebase (2.7.7 in my case)- and it finds no shortage of them
.... I guess I could filter the output with grep....
But regardless of all that, there's a showstopper - before it even
gets to my products, pychecker barfs on DBTab (which must come
from somewhere pretty deep in there, as my code doesn't use it)...
like so:

Traceback (most recent call last):
  File "/zope/ZopeSoftwareHome/lib/python/Zope/Startup/datatypes.py", line
106,
in importable_name
    package = __import__(n, g, g, component)
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/DBTab/ClassFactories.py", line
18, in
?
    import OFS.Uninstalled
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/OFS/Uninstalled.py", line 16, in ?
    import  SimpleItem, Globals, Acquisition
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/OFS/SimpleItem.py", line 23, in ?
    import re, sys, Globals, App.Management, Acquisition, App.Undo
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/Globals.py", line 23, in ?
    import Acquisition, ComputedAttribute, App.PersistentExtra, os
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/App/PersistentExtra.py", line
14, in ?

    from class_init import default__class_init__
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/App/class_init.py", line 14, in ?
    from AccessControl.PermissionRole import PermissionRole
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/AccessControl/__init__.py", line
16, i
n ?
    import DTML
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/AccessControl/DTML.py", line 18,
in ?
    from DocumentTemplate import DT_Util
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/DocumentTemplate/__init__.py",
line 22
, in ?
    from DocumentTemplate import String, File, HTML, HTMLDefault, HTMLFile
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File
"/zope/ZopeSoftwareHome/lib/python/DocumentTemplate/DocumentTemplate.py",
 line 112, in ?
    from DT_String import String, File
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/DocumentTemplate/DT_String.py",
line 1
7, in ?
    from DT_Util import ParseError, InstanceDict, TemplateDict,
render_blocks, s
tr
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/DocumentTemplate/DT_Util.py",
line 42,
 in ?
    from cDocumentTemplate import InstanceDict, TemplateDict, \
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
    pymodule = _orig__import__(name, globals, locals, fromlist)
ImportError: No module named html_quote


-- 
Paul Winkler
http://www.slinkp.com



_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to