Features

 

Features

Here is the list of things that can be tested with Pylint :

Basic:
  • doc strings

  • modules / classes / functions / methods / arguments / variables name

  • number of arguments, local variables, branchs, returns and statements in functions, methods

  • required module's attributes

  • dangerous default values as arguments

  • redefinition of function / method / class

  • uses of the global statement

Format:
  • unauthorized constructions

  • strict indentation

  • lines'length

Imports:
  • external modules dependancies

  • relative / wildcard imports

  • cyclic imports

  • uses of depreceted modules

Variables:
  • unused variables / imports

  • undefined variables

  • redefinition of variable from builtins or from an outer scope

  • use of variable before assigment

Classes:
  • 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

Metrics, doesn't check anything but give some number:
  • total number of lines

  • total number of code lines

  • total number of docstring lines

  • total number of comments lines

  • total number of empty lines