diff options
Diffstat (limited to 'doc/faq.rst')
-rw-r--r-- | doc/faq.rst | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/doc/faq.rst b/doc/faq.rst index e3cd73e..a42080e 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -1,5 +1,7 @@ .. -*- coding: utf-8 -*- +.. _faq: + ========================== Frequently Asked Questions ========================== @@ -65,11 +67,23 @@ Pylint from the repository, simply invoke :: ----------------------------------- Pylint requires the latest `astroid`_ and `logilab-common`_ packages. It should be -compatible with any Python version greater than 2.5.0. +compatible with any Python version greater than 2.7.0. .. _`astroid`: https://bitbucket.org/logilab/astroid .. _`logilab-common`: http://www.logilab.org/project/logilab-common +2.4 What versions of Python is Pylint supporting? +-------------------------------------------------- + +Since Pylint 1.4, we support only Python 2.7+ and Python 3.3+. +Using this strategy really helps in maintaining a code base compatible +with both versions and from this benefits not only the maintainers, +but the end users as well, because it's easier to add and test +new features. +If support for Python 2.6 is absolutely required, then the version +from pylint-1.3 branch can be used. It will receive backports of +bug fixes for a while. + 3. Running Pylint ================= @@ -169,7 +183,6 @@ No, starting from 0.25.3, you can use symbolic names for messages:: # pylint: disable=fixme, line-too-long -You can show these symbols in the output with the `-sy` option. 4.5 I have a callback function where I have no control over received arguments. How do I avoid getting unused argument warnings? ---------------------------------------------------------------------------------------------------------------------------------- @@ -192,30 +205,6 @@ tricks like: :: method-hidden, too-many-lines -4.7 Why do I get a lot of spurious "unused variables messages" when using psyobj from psyco_? ----------------------------------------------------------------------------------------------- - -This is actually due to a bug in psyco, making the locals() -function for objects inheriting from *psyobj* 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 :: - - import os - try: - if os.environ.has_key('PYLINT_IMPORT'): - raise ImportError() - from psyco.classes import psyobj - except ImportError: - class psyobj: - pass - -NOTICE: this problem should not occur with Pylint >= 0.5 since from -this version Pylint is not looking anymore for information in living -objects (i.e. it no longer imports analysed modules) - -.. _psyco: http://psyco.sf.net - 5. Classes and Inheritance ========================== @@ -259,7 +248,7 @@ lower bound on it. By default, the formula to calculate score is :: 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) However, this option can be changed in the Pylint rc file. If having negative -values really bugs you, you can set the formula to be the minimum of 0 and the +values really bugs you, you can set the formula to be the maximum of 0 and the above expression. |