Download latest PDF - Read the Docs

Transcript
Pylint Documentation, Release 1.5.0
• Don’t emit ‘import-error’ if an import was protected by a try-except, which excepted ImportError.
• Fix an ‘unused-import’ false positive, when the error was emitted for all the members imported with ‘from
import’ form. Closes issue #304.
• Don’t emit ‘invalid-name’ when assigning a name in an ImportError handler. Closes issue #302.
• Don’t count branches from nested functions.
• Fix a false positive with ‘too-few-format-args’, when the format strings contains duplicate manual position
arguments. Closes issue #310.
• fixme regex handles comments without spaces after the hash. Closes issue #311.
• Don’t emit ‘unused-import’ when a special object is imported (__all__, __doc__ etc.). Closes issue #309.
• Look in the metaclass, if defined, for members not found in the current class. Closes issue #306.
• Don’t emit ‘protected-access’ if the attribute is accessed using a property defined at the class level.
• Detect calls of the parent’s __init__, through a binded super() call.
• Check that a class has an explicitly defined metaclass before emitting ‘old-style-class’ for Python 2.
• Emit ‘catching-non-exception’ for non-class nodes. Closes issue #303.
• Order of reporting is consistent.
• Add a new warning, ‘boolean-datetime’, emitted when an instance of ‘datetime.time’ is used in a boolean
context. Closes issue #239.
• Fix a crash which ocurred while checking for ‘method-hidden’, when the parent frame was something different
than a function.
• Generate html output for missing files. Closes issue #320.
• Fix a false positive with ‘too-many-format-args’, when the format string contains mixed attribute access arguments and manual fields. Closes issue #322.
• Extend the cases where ‘undefined-variable’ and ‘used-before-assignment’ can be detected. Closes issue #291.
• Add support for customising callback identifiers, by adding a new ‘–callbacks’ command line option. Closes
issue #326.
• Add a new warning, ‘logging-format-interpolation’, emitted when .format() string interpolation is used within
logging function calls.
• Don’t emit ‘unbalanced-tuple-unpacking’ when the rhs of the assignment is a variable length argument. Closes
issue #329.
• Add a new warning, ‘inherit-non-class’, emitted when a class inherits from something which is not a class.
Closes issue #331.
• Fix another false positives with ‘undefined-variable’, where the variable can be found as a class assignment and
used in a function annotation. Closes issue #342.
• Handle assignment of the string format method to a variable. Closes issue #351.
• Support wheel packaging format for PyPi. Closes issue #334.
• Check that various built-ins that do not exist in Python 3 are not used: apply, basestring, buffer, cmp, coerce,
execfile, file, long raw_input, reduce, StandardError, unicode, reload and xrange.
• Warn for magic methods which are not used in any way in Python 3: __coerce__, __delslice__, __getslice__,
__setslice__, __cmp__, __oct__, __nonzero__ and __hex__.
• Don’t emit ‘assigning-non-slot’ when the assignment is for a property. Closes issue #359.
58
Chapter 15. Changes & Contributors