static-code-analysis

Descriptive flake8 errors in PyCharm

Descriptive flake8 errors in PyCharm Question: PyCharm does not have a built-in support for flake8 at the moment. But, flake8 can be configured to run as an external tool. Sometimes, especially for Python newcomers, not every flake8 warning is understandable and additional clarification is required. We’ve recently stumbled upon the Flake8Rules project which attempts to …

Total answers: 5

Automated docstring and comments spell check

Automated docstring and comments spell check Question: Consider the following sample code: # -*- coding: utf-8 -*- """Test module.""" def test(): """Tets function""" return 10 pylint gives it 10 of 10, flake8 doesn’t find any warnings: $ pylint test.py … Global evaluation —————– Your code has been rated at 10.00/10 … $ flake8 test.py $ …

Total answers: 2