3.1.14. Pylint

The tool is located in tools/waf-tools.

3.1.14.1. Tool Documentation

Implements a waf tool to run pylint.

Listing 3.14 shows how to use this tool.

Listing 3.14 f_pylint.py
1def options(opt):
2    opt.load("pylint")
3
4def configure(conf):
5    conf.load("pylint")
6
7def build:
8    files = bld.path.ant_glob("\*\*/\*.py")
9    bld(features="pylint", files=files)
f_pylint.configure(conf)

configuration step of the pylint tool

  • searches for the program pylint

  • applies configured options

f_pylint.options(opt)

Passing options to pylint

class f_pylint.pylint(*args: Any, **kwargs: Any)

Bases: waflib.Task.Task

Class to implement running the pylint static analysis tool on Python files

color = 'BLUE'

color in which the command line is displayed in the terminal

Type

str

keyword()

displayed keyword when pylint is run