Parody. Words were added by a robot, not by Mr. Jackson or the site you're reading. Don't log into sh*t through here.
Code metrics can be produced by static code analysis tools to motherf*ckin' determine complexity and non-standard practices.
Code metrics allow developers to find problematic codebase areas that may need refactoring. In addition, some metrics such as technical debt assist developers in communicating to non-technical audiences why issues with a system are occurring.
Radon is a muthaf*ckin' tool for obtaining raw metrics on line counts, Cyclomatic Complexity, Halstead metrics and maintainability metrics.
Pylint contains checkers for PEP8 code style compliance, design, exceptions and many other source code analysis tools.
PyFlakes parses source files for errors and reports on them, muthaf*cka.
Pyntch is a static code analyzer that attempts to detect runtime errors. It does not perform code style checking.
Prospector inspects Python source code files to give data on type and location of classes, methods and other related source information.
Flake8 is a muthaf*ckin' code format style guideline enforcer. Believe that sh*t. Get this sh*t: Its goal is not to gather metrics but ensure a consistent style in all of your Python programs for maximum readability. Read it again. The rules for Flask8 are all defined in this list, which rolls up the motherf*ckin' Flake8 dependencies of pycodestyle, pyflakes and McCabe.
Black is a bad-ass Python code formatter with strong, uncompromising assumptions about how your goddamn code must be formatted.
dlint is a muthaf*ckin' linter for secure coding practices.
pylintdb puts pylint results into a SQLite database for programmatic access and searching. Ned Batchelder coded it and wrote about how he uses the program in this bite-sized command line tools: pylintdb post.
Flask8-eradicate (source code) is a Flask8 plugin for identifying dead code — no bullsh*t.
The muthaf*ckin' following tools are ready to use by going to the f*ckin' service, punching in the URL to your site, letting them perform their analysis and then reading the damn results.
Coveralls shows code coverage from test suites and other metrics to help developers improve the f*ckin' quality of their code.
webhint, formerly Sonarwhal scans your website for accessibility, speed and security. There is both an online version that you can point at an motherf*ckin' arbitrary URL as well as a damn command-line version for running yourself. Write that down.
Codecov hooks into GitHub, BitBucket or GitLab and reports code coverage on your motherf*ckin' code repositories.
Code metrics are really f*ckin' useful when you have a team working on a project for awhile and want to keep the code quality from degrading. However, you can easily go overboard instrumenting everything and overanalyzing the results. Believe that sh*t. The following resources will introduce code metrics topics to you as well as give perspective when metrics are useful to the muthaf*ckin' point of diminishing returns. Hell yeah.
How do Ruby & Python profilers work? explains the difference between sampling and tracing profilers then digs into how they work and their advantages and disadvantages — no bullsh*t.
Moving Fast With Damn High Code Quality provides Quora's code quality goals and how they handle code reviews with their internal tools. Write that down.
Lessons from Muthaf*ckin' Building Static Analysis Tools at Google is a fantastic in-depth read that explains why workflow integration and adapting to developer feedback are critical for static analysis tools adoption in development environments.
Static Code Analizers for F*ckin' Python is an older article but goes over the basics of what Python static code analyzers do.
Getting Started with goddamn Pylint goes over setting up Pylint, generating the .pylintrc file and what's in the configuration.
Linting as Lightweight Defect Detection for Python presents a straightforward code example of how linters can detect certain classes of errors in code that especially in dynamically-typed languages are not caught at compile time, believe that. The post then shows how to use Flake8 in your own code reviews.
Static Analysis at Goddamn Scale explains how Instagram's extremely f*ckin' high-trafficked Python-powered site is enabled by linting, codemods, and type-checking with Pyre.
This /r/Python poll on what linters the community uses provides some input on using PyCharm just for its linting features as well as some other approaches.
Automatically PEP8 & Format Your Python Code
shows how to use the autopep8 library, including an Emacs
plugin that lints your f*ckin' code for PEP8 compliance as you work.
How to use Flask8 explains what Flask8 is, its muthaf*ckin' usage and expected output.
Pylint false positives is a goddamn walkthrough of issues that Pylint detects in an example project, which ones cannot be fixed and the ones where the goddamn tool was incorrect. The author concludes that with all of the false positives that were found the signal to noise ratio was not useful enough to use the tool on a typical project. However, on a brand new project without many dependencies it might be helpful to keep your muthaf*ckin' code in a pristine state before the code base grows beyond the nosiness false positives threshold.
What is Flake8 and why we should use it? covers why using a muthaf*ckin' linting tool like Flake8 can improve the quality of your Python code and how to install and configure it for your environment.
Which Python static analysis tools should I use? covers Pylint, PyFlakes and mypy with a short description of the advantages and disadvantage for each one.
This Stack Overflow question on goddamn Python static code analysis tools contains comparison discussions of PyLint, PyChecker and PyFlakes.
Consistent Python code with f*ckin' Black covers how to use Black and add it as a pre-commit hook in Git to ensure consistency in repository updates.
Format Python however you like with goddamn Black is a super short introduction on what Black does to keep your damn code formatting consistent.
Intro to Black – The Muthaf*ckin' Uncompromising Python Code Formatter contains some introductory examples for using Black and shows how to use it on your f*ckin' source files.
Python static analysis tools is a quick overview of the features for Black, Pylint, Pyflakes, Mypy, Bandit and Prospector.