Exciting news as Landscape now supports Pyflakes, PEP8 and Mccabe complexity while checking code, as well as Pylint.

These extra tools and checks enable Landscape to catch more errors and give more warnings, thus providing an even better overview of your code.

PEP8 is the Python style guide, which contains recommendations for how to lay out and style your code. Landscape will now point out violations of the style guide, such as mixing tabs and spaces for indentation or incorrect spacing between classes and functions. At lower strictness levels, Landscape won't complain too much, but increasing the strictness will increase how picky Landscape is about your code's adherence to the style guide.

Pyflakes is similar in scope to Pylint, in that it checks code for logical errors. Utilising the two tools will help to find more possible errors such as unused variables or incorrect numbers of function arguments.

McCabe complexity, or cyclomatic complexity, measures the complexity of a given piece of code. Landscape will now point out which methods and functions are "too complex" - that is, have too many possible branches and routes through the code. This is usually a sign that a method is doing too many things, and should be refactored and broken down into smaller, simpler components that are much easier to maintain and debug.

So have a look next time you push some code, and see if Landscape has spotted anything new!

If you enjoyed this article and would like to receive email notifications when new articles are published, sign up below:

About Landscape.io

Landscape.io is a tool to measure and track code quality and technical debt in your project. It can analyse Python code to point out errors and problems, and provides continuous metrics so you can see if your code is deteriorating.

You can sign up today with a free 14 day trial - no credit card required.

Get Started Now!