EuroPython 2015

12 years of Pylint (or How I learned to stop worrying about bugs)

Given the dynamic nature of Python, some bugs tend to creep in our codebases. Innocents NameErrors or hard-to-find bugs with variables used in a closure, but defined in a loop, they all stand no chance in front of Pylint ( In this talk, I’ll present one of the oldest static analysis tools for Python, with emphasis on what it can do to understand your Python code. Pylint is both a style checker, enforcing PEP 8 rules, as well as a code checker in the vein of pyflakes and the likes, but its true power isn’t always obvious to the eye of beholder. It can detect simple bugs such as unused variables and imports, but it can also detect more complicated cases such as invalid arguments passed to functions, it understands the method resolution order of your classes and what special methods aren’t implemented correctly. Starting from abstract syntax trees, we’ll go through its inference engine and we’ll see how Pylint understands the logical flow of your program and what sort of type hinting techniques are used to improve its inference, including PEP 484 type hints. As a bonus, I’ll show how it can be used to help you port your long-forgotten library to Python 3, using its new –py3k mode.

Link to presentation:

in on Wednesday 22 July at 14:30 See schedule


Do you have some questions on this talk?

New comment