Pylint - Python code analyzer

Subscribe to our

An experienced software developer will confirm that Python code analysis is a very complex subject. It is important to continuously check code and prove that software works. It is important to ensure that software is testable, readable, and maintainable on each stage of the development. Among Python code analyzers that help to make program code better and see if it fits the standards Pylint is probably the most popular one.

Pylint is a checker for the Python programming language that looks for the source code bug and programming errors, Pylint enforces a coding standard and aims at improving code quality and coding style. The default coding style follows PEP 8, the official Python style guide, recommendations. Pylint is a static type analysis system, it analyses code without actually running it as opposed to dynamic analysis that is performed on executing programs.

Pylint is free and distributed under the GNU Public Licence. This software is highly configurable, customizable, and it is easy to write a small code/plugin that checks specific feature or change configurations to meet certain style preferences. Pylint displays a number of messages during code analysis along with statistics about the number of warnings and errors found in different files. Moreover, if Pylint is run for the second time, the statistics from the previous run will be displayed with the current one, so that programmer can see whether code was improved. To boost motivation of code writers code is also given an overall mark, based on the number and severity of the warnings and errors.

Pylint detects duplicated code and checks if declared interfaces are truly implemented. Pylint is integrated in various IDEs and editors, including Spyder, Editra, TextMate, Eclipse, emacs, vim.

Pylint features:

  • logging checker
  • similarities checker
  • string_format checker
  • format checker
  • typecheck checker
  • variables checker
  • miscellaneous checker
  • metrics checker
  • imports checker
  • classes checker
  • design checker
  • basic checker
  • exceptions checker
  • newstyle checker

Pylint is excellent tool for automatical code metrics computing. Its collection of rules and conventions is used to analyze code and to search for the potential errors and violations of recommended coding style standards. Pylint provides easy to read and rich information about Python code that might be read from auto-generated documentation, or integrated directly into IDEs or editors.

Quintagroup programmers use several different code analyzers: flake8, pyflakes, pylint, and pep8, since they provide versatile results. Pylint is an independent tool that produces the deepest analysis and rates the code.

Follow