This video shows 7 code smells and how to fix them, using a Python example. You're probably guilty of at least one of these smells (as I was in the past :) ) - knowing about these will help you write much cleaner, more robust code.

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/Python

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
  • SonarQube

    Continuous Inspection

    A nice tool for catching many code smells as well as other potential software issues is SonarQube https://www.sonarqube.org/

  • black

    The uncompromising Python code formatter

    While it doesn't fix stupid people being stupid, I make sure that I have a pre-commit hook (via pre-commit) that runs mypy (as well as black and flake8) to make sure that I don't write code that would fail my static-typing sensibilities.

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • pre-commit

    A framework for managing and maintaining multi-language pre-commit hooks.

    While it doesn't fix stupid people being stupid, I make sure that I have a pre-commit hook (via pre-commit) that runs mypy (as well as black and flake8) to make sure that I don't write code that would fail my static-typing sensibilities.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts