pychecker --version
0.8.19
I tried to check ipython project with pychecker. It gives me " INTERNAL ERROR -- STOPPED PROCESSING FUNCTION --"
Some investigation shows that:
'str' type doesn't have 'format' method in pycheker internals. It was the problem which triggers error. I saw a list of builtin methods with ipython:
from pychecker import python
python.BUILTIN_METHODS.get(str)
See missing_format.py. Example output:
Processing module missing_format (missing_format.py)...
missing_format.py:3: INTERNAL ERROR -- STOPPED PROCESSING FUNCTION --
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pychecker/warn.py", line 242, in _checkFunction
_checkCode(code, codeSource)
File "/usr/lib/python2.7/dist-packages/pychecker/warn.py", line 153, in _checkCode
dispatch_func(oparg, operand, codeSource, code)
File "/usr/lib/python2.7/dist-packages/pychecker/CodeChecks.py", line 1690, in _CALL_FUNCTION
_handleFunctionCall(codeSource, code, oparg)
File "/usr/lib/python2.7/dist-packages/pychecker/CodeChecks.py", line 474, in _handleFunctionCall
check_arg_count)
File "/usr/lib/python2.7/dist-packages/pychecker/CodeChecks.py", line 250, in _checkBuiltin
_validateKwArgs(code, methodInfo, func_name[1], kwArgs)
File "/usr/lib/python2.7/dist-packages/pychecker/CodeChecks.py", line 192, in _validateKwArgs
if len(info) < 4:
TypeError: object of type 'NoneType' has no len()
objType = code.typeMap.get(utils.safestr(func_name[0]), [])
Pychecker probably need to distinguish variable from literals to handle such cases. Example for the second problem is in str_handling.py.
Example for the second problem