[Pydev-cvs] org.python.pydev/PySrc/ThirdParty/logilab/pylint/doc features.txt,1.2,1.3 features.html,
Brought to you by:
fabioz
|
From: Fabio Z. <fa...@us...> - 2005-02-24 18:28:58
|
Update of /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8113/PySrc/ThirdParty/logilab/pylint/doc Modified Files: features.txt features.html FAQ.html quickstart.txt Log Message: New pylint version integrated Index: features.html =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/doc/features.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** features.html 16 Feb 2005 16:45:45 -0000 1.2 --- features.html 24 Feb 2005 18:28:49 -0000 1.3 *************** *** 0 **** --- 1,1094 ---- + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> + <html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> + <meta name="language" content="fr"> + <meta name="author" content="Logilab"> + <meta name="organization" content="Logilab S.A."> + <meta name="generator" content="Logilab Powerful Stylesheets"> + <title>PyLint features</title> [...1065 lines suppressed...] + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">F0321:</span> + </div> + <div class="varlistitem"> + <p class="para">Used when an unexpected error occured in bad format detection. Please report + the error if it occurs. This message belongs to the format checker.</p> + </div> + </div> + </div> + + + <table class="footnote"></table> + </td> + </tr></table> + <p class="body-foot"></p> + </body> + </html> Index: features.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/doc/features.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** features.txt 16 Feb 2005 16:45:45 -0000 1.2 --- features.txt 24 Feb 2005 18:28:49 -0000 1.3 *************** *** 9,25 **** Description ~~~~~~~~~~~ ! lint Python modules using external checkers. ! ! This is the main checker controling the other ones and the reports ! generation. It is itself both a raw checker and an astng checker in order ! to: ! * handle message activation / deactivation at the module level * handle some basic but necessary stats'data (number of classes, methods...) ! ! This checker also defines the following reports: ! * R0001: Total errors / warnings ! * R0002: % errors / warnings by module ! * R0003: Messages ! * R0004: Global evaluation Messages --- 9,25 ---- Description ~~~~~~~~~~~ ! lint Python modules using external checkers. ! ! This is the main checker controling the other ones and the reports ! generation. It is itself both a raw checker and an astng checker in order ! to: ! * handle message activation / deactivation at the module level * handle some basic but necessary stats'data (number of classes, methods...) ! ! This checker also defines the following reports: ! * R0001: Total errors / warnings ! * R0002: % errors / warnings by module ! * R0003: Messages ! * R0004: Global evaluation Messages *************** *** 58,61 **** --- 58,114 ---- message belongs to the master checker. + F0003: + Used to indicate that the user asked to analyze a builtin module which has + been skipped. This message belongs to the master checker. + + + + Variables + --------- + + Description + ~~~~~~~~~~~ + checks for + * unused variables / imports + * undefined variables + * redefinition of variable from builtins or from an outer scope + * use of variable before assigment + + + Messages + ~~~~~~~~ + W0601: + Used when a variable is defined through the "global" statement but the + variable is not defined in the static global scope. This message belongs to + the variables checker. + + W0611: + Used when an imported module or variable is not used. This message belongs to + the variables checker. + + W0612: + Used when a variable is defined but not used. This message belongs to the + variables checker. + + W0613: + Used when a function or method argument is not used. This message belongs to + the variables checker. + + W0621: + Used when a variable's name hide a name defined in the outer scope. This + message belongs to the variables checker. + + W0622: + Used when a variable or function override a built-in. This message belongs to + the variables checker. + + E0601: + Used when a local variable is accessed before it's assigment. This message + belongs to the variables checker. + + E0602: + Used when an undefined variable is accessed. This message belongs to the + variables checker. + *************** *** 65,80 **** Description ~~~~~~~~~~~ ! checks for : ! * doc strings ! * modules / classes / functions / methods / arguments / variables name ! * number of arguments, local variables, branchs, returns and statements in ! functions, methods ! * required module attributes ! * dangerous default values as arguments ! * redefinition of function / method / class ! * uses of the global statement ! ! This checker also defines the following reports: ! * R0101: Statistics by type Messages --- 118,133 ---- Description ~~~~~~~~~~~ ! checks for : ! * doc strings ! * modules / classes / functions / methods / arguments / variables name ! * number of arguments, local variables, branchs, returns and statements in ! functions, methods ! * required module attributes ! * dangerous default values as arguments ! * redefinition of function / method / class ! * uses of the global statement ! ! This checker also defines the following reports: ! * R0101: Statistics by type Messages *************** *** 142,253 **** ! Variables ! --------- ! ! Description ! ~~~~~~~~~~~ ! checks for ! * unused variables / imports ! * undefined variables ! * redefinition of variable from builtins or from an outer scope ! * use of variable before assigment ! ! Messages ! ~~~~~~~~ ! W0601: ! Used when a variable is defined through the "global" statement but the ! variable is not defined in the static global scope. This message belongs to ! the variables checker. ! ! W0611: ! Used when an imported module or variable is not used. This message belongs to ! the variables checker. ! ! W0612: ! Used when a variable is defined but not used. This message belongs to the ! variables checker. ! ! W0613: ! Used when a function or method argument is not used. This message belongs to ! the variables checker. ! ! W0621: ! Used when a variable's name hide a name defined in the outer scope. This ! message belongs to the variables checker. ! ! W0622: ! Used when a variable or function override a built-in. This message belongs to ! the variables checker. ! ! E0601: ! Used when a local variable is accessed before it's assigment. This message ! belongs to the variables checker. ! ! E0602: ! Used when an undefined variable is accessed. This message belongs to the ! variables checker. ! ! ! ! Imports ------- Description ~~~~~~~~~~~ ! checks for ! * external modules dependencies ! * relative / wildcard imports ! * cyclic imports ! * uses of deprecated modules ! ! This checker also defines the following reports: ! * R0401: External dependencies ! * R0402: Modules dependencies graph ! ! Messages ! ~~~~~~~~ ! R0401: ! Used when a cyclic import between two or more modules is detected. This ! message belongs to the imports checker. ! ! W0401: ! Used when `from module import *` is detected. This message belongs to the ! imports checker. ! ! W0402: ! Used a module marked as deprecated is imported. This message belongs to the ! imports checker. ! ! W0403: ! Used when an import relative to the package directory is detected. This ! message belongs to the imports checker. ! ! W0404: ! Used when a module is reimported multiple times. This message belongs to the ! imports checker. ! ! W0406: ! Used when a module is importing itself. This message belongs to the imports ! checker. ! ! F0401: ! Used when pylint has been unable to import a module. This message belongs to ! the imports checker. ! ! - Classes - ------- - Description - ~~~~~~~~~~~ - checks for : - * methods without self as first argument - * overriden methods signature - * access only to existant members via self - * attributes not defined in the __init__ method - * supported interfaces implementation - * unreachable code - Messages ~~~~~~~~ --- 195,212 ---- ! Classes ------- Description ~~~~~~~~~~~ ! checks for : ! * methods without self as first argument ! * overriden methods signature ! * access only to existant members via self ! * attributes not defined in the __init__ method ! * supported interfaces implementation ! * unreachable code Messages ~~~~~~~~ *************** *** 343,350 **** Description ~~~~~~~~~~~ ! checks for sign of poor/misdesign: ! * number of methods, attributes, local variables... ! * size, complexity of functions, methods ! Messages ~~~~~~~~ --- 302,310 ---- Description ~~~~~~~~~~~ ! checks for sign of poor/misdesign: ! * number of methods, attributes, local variables... ! * size, complexity of functions, methods ! ! Messages ~~~~~~~~ *************** *** 399,402 **** --- 359,409 ---- + Imports + ------- + + Description + ~~~~~~~~~~~ + checks for + * external modules dependencies + * relative / wildcard imports + * cyclic imports + * uses of deprecated modules + + This checker also defines the following reports: + * R0401: External dependencies + * R0402: Modules dependencies graph + + Messages + ~~~~~~~~ + R0401: + Used when a cyclic import between two or more modules is detected. This + message belongs to the imports checker. + + W0401: + Used when `from module import *` is detected. This message belongs to the + imports checker. + + W0402: + Used a module marked as deprecated is imported. This message belongs to the + imports checker. + + W0403: + Used when an import relative to the package directory is detected. This + message belongs to the imports checker. + + W0404: + Used when a module is reimported multiple times. This message belongs to the + imports checker. + + W0406: + Used when a module is importing itself. This message belongs to the imports + checker. + + F0401: + Used when pylint has been unable to import a module. This message belongs to + the imports checker. + + + Exceptions ---------- *************** *** 404,411 **** Description ~~~~~~~~~~~ ! checks for ! * excepts without exception filter ! * string exceptions ! Messages ~~~~~~~~ --- 411,419 ---- Description ~~~~~~~~~~~ ! checks for ! * excepts without exception filter ! * string exceptions ! ! Messages ~~~~~~~~ *************** *** 443,451 **** ~~~~~~~~~~~ checks for similarities and duplicated code. This computation may be ! memory / CPU intensive, so you should disable it if you experiments some ! problems. ! ! This checker also defines the following reports: ! * R0801: Duplication Messages --- 451,459 ---- ~~~~~~~~~~~ checks for similarities and duplicated code. This computation may be ! memory / CPU intensive, so you should disable it if you experiments some ! problems. ! ! This checker also defines the following reports: ! * R0801: Duplication Messages *************** *** 463,475 **** Description ~~~~~~~~~~~ ! does not check anything but gives some raw metrics : ! * total number of lines ! * total number of code lines ! * total number of docstring lines ! * total number of comments lines ! * total number of empty lines ! ! This checker also defines the following reports: ! * R0701: Raw metrics Miscellaneous --- 471,483 ---- Description ~~~~~~~~~~~ ! does not check anything but gives some raw metrics : ! * total number of lines ! * total number of code lines ! * total number of docstring lines ! * total number of comments lines ! * total number of empty lines ! ! This checker also defines the following reports: ! * R0701: Raw metrics Miscellaneous *************** *** 478,485 **** Description ~~~~~~~~~~~ ! checks for: ! * warning notes in the code like FIXME, XXX ! * PEP 263: source code with non ascii character but no encoding declaration ! Messages ~~~~~~~~ --- 486,494 ---- Description ~~~~~~~~~~~ ! checks for: ! * warning notes in the code like FIXME, XXX ! * PEP 263: source code with non ascii character but no encoding declaration ! ! Messages ~~~~~~~~ *************** *** 508,517 **** Description ~~~~~~~~~~~ ! checks for : ! * unauthorized constructions ! * strict indentation ! * line length ! * use of <> instead of != ! Messages ~~~~~~~~ --- 517,527 ---- Description ~~~~~~~~~~~ ! checks for : ! * unauthorized constructions ! * strict indentation ! * line length ! * use of <> instead of != ! ! Messages ~~~~~~~~ Index: FAQ.html =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/doc/FAQ.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FAQ.html 16 Feb 2005 16:45:45 -0000 1.2 --- FAQ.html 24 Feb 2005 18:28:49 -0000 1.3 *************** *** 0 **** --- 1,226 ---- + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> + <html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> + <meta name="language" content="fr"> + <meta name="author" content="Logilab"> + <meta name="organization" content="Logilab S.A."> + <meta name="generator" content="Logilab Powerful Stylesheets"> + <title>Frequently Asked Questions / Usage tips for PyLint</title> + <meta name="keywords" content="logilab"> + <link rel="stylesheet" href="http://www.logilab.fr/lglb-dcbk.css" type="text/css"> + <!--[if IE]> + <style type="text/css"> + div.sidebar { width: expression((document.body.clientWidth/3.5)+"px"); } + </style> + <![endif]--> + </head> + <body> + <table class="body-head" width="100%"><tr> + <td class="body-logo"><img src="http://www.logilab.fr/images/logilab.png" width="150" border="0" alt="Logilab"></td> + <td class="body-title"><h3 class="body-title">Frequently Asked Questions / Usage tips for PyLint</h3></td> + </tr></table> + <table class="body-main" width="100%"><tr> + <td class="body-menu"> </td> + <td class="body-content"> + <div class="component-title-block"><h1 class="component-title">Frequently Asked Questions / Usage tips for PyLint</h1></div> + + <div class="variablelist"> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Question:</span> + </div> + <div class="varlistitem"> + <p class="para">Is it possible to give file as argument to pylint, instead of module ?</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Answer:</span> + </div> + <div class="varlistitem"> + <p class="para">pylint expects the name of a package or module as argument. As a convenience, + you can give to it a file name if it's possible to guess a module name from + the file's path, using the python path. Some examples :</p> + <p class="para">"pylint mymodule.py" should always works since the current working + directory is automatically added on top of the python path</p> + <p class="para">"pylint directory/mymodule.py" will work if "directory" is a python + package (i.e. has an __init__.py file) or if "directory" is in the + python path.</p> + <p class="para">"pylint /whatever/directory/mymodule.py" will work if either:</p> + <div class="blockquote"> + <ul class="list" style="list-style-type: disc"> + <li class="listitem"> + <p class="para">"/whatever/directory" is in the python path</p> + </li> + <li class="listitem"> + <p class="para">your cwd is "/whatever/directory"</p> + </li> + <li class="listitem"> + <p class="para">"directory" is a python package and "/whatever" is in the python + path</p> + </li> + <li class="listitem"> + <p class="para">"directory" is a python package and your cwd is "/whatever" + and so on...</p> + </li> + </ul> + </div> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Question:</span> + </div> + <div class="varlistitem"> + <p class="para">I'm using psyobj from <a href="http://psyco.sf.net">psyco</a> and get a lot of spurious "unused variables + messages". Is it normal ?</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Answer: </span> + </div> + <div class="varlistitem"> + <p class="para">Yes. That's actually due to a bug in psyco, making the locals() + function for objects inheriting from <i>psyobj</i> returning an empty + dictionary. For the moment, the only way to fix this is to use the + PYLINT_IMPORT environment variable to not use psyco during pylint + checking. Sample code</p> + <div class="programlisting"> + import os + try: + if os.environ.has_key('PYLINT_IMPORT'): + raise ImportError() + from psyco.classes import psyobj + except ImportError: + class psyobj: + pass</div> + <p class="para">NOTICE: this problem should not occurs with pylint >= 0.5 since from + this version pylint is not looking anymore for information in living + objects (i.e. it doesn't anymore import analysed modules)</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Question:</span> + </div> + <div class="varlistitem"> + <p class="para">I've a function / method which is a callback where I do not have any + control on received argument, and pylint is complaining about unused + arguments. What can I do to avoid those warnings ?</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Answer:</span> + </div> + <div class="varlistitem"> + <p class="para">prefix (ui) the callback's name by <i>cb_</i>, as in cb_onclick(...). By + doing so arguments usage won't be checked. Another solution is to + use one of the name defined in the "dummy-variables" configuration + variable for unused argument ("_" and "dummy" by default).</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Question:</span> + </div> + <div class="varlistitem"> + <p class="para">When pylint is considering a class as an interface ?</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Answer:</span> + </div> + <div class="varlistitem"> + <p class="para">A class is considered as an interface if there is a class named + "Interface" somewhere in it ancestor's tree.</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Question:</span> + </div> + <div class="varlistitem"> + <p class="para">When pylint is considering that a class is implementing a given + interface ?</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Answer:</span> + </div> + <div class="varlistitem"> + <p class="para">Pylint is using the Zope 2 interfaces conventions, and so is + considering that a class is implementing interfaces listed in its + __implements__ attribute.</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Question:</span> + </div> + <div class="varlistitem"> + <p class="para">When pylint is considering a class as an abstract class ?</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Answer:</span> + </div> + <div class="varlistitem"> + <p class="para">A class is considered as an abstract class if at least one of its + methods is doing nothing but raising NotImplementedError</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Question:</span> + </div> + <div class="varlistitem"> + <p class="para">Is there some way to disable some message for a particular module + only ?</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Answer:</span> + </div> + <div class="varlistitem"> + <p class="para">Yes, you can disable or enable (globally disabled) message at the + module level by adding the corresponding option in a comment at the + top of the file:</p> + <div class="programlisting"> + # pylint: disable-msg=W0401, E0202 + # pylint: enable-msg=C0302</div> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Question:</span> + </div> + <div class="varlistitem"> + <p class="para">I've a mixin class relying on attributes of the mixed class, and I + would like to not have the "access to undefined member" message on + this class. Is it possible ?</p> + </div> + </div> + <div class="varlistentry"> + <div class="varterm"> + <span style="font-family: monospace">Answer:</span> + </div> + <div class="varlistitem"> + <p class="para">Yes :o) To do so you have to set the ignore-mixin-members option to + "yes" (this is the default value) and to name your mixin class with + a name which ends with "mixin" (whatever case)</p> + </div> + </div> + </div> + <table class="footnote"></table> + </td> + </tr></table> + <p class="body-foot"></p> + </body> + </html> |