Python Linter

Open-source Python projects categorized as Linter

Top 23 Python Linter Projects

  1. mypy

    Optional static typing for Python

    Project mention: Show HN: Oxyde – Pydantic-native async ORM with a Rust core | news.ycombinator.com | 2026-03-13

    Coupling together these things is short-sighted, but I get that in simple CRUD backends they really do sometimes stay the same for a long time. As long as there is an easy and obvious way out, then it's probably fine.

    The big problem with ActiveRecord style ORMs, though, is the big ball of mud you end up with when anything from anywhere in the code can call `save()` on an object at any time to serialise and persist it in the db. It requires a constant vigilance to stop this happening, but many people don't even try in the first place.

    What would be ideal is to have an automatically generated DTO-type object that you can pass to other parts of the code that shouldn't be calling `save()` themselves. It could be a "real" object, or just annotated using a Protocol, such that calling `save()` would be a type error. Django models unfortunately don't work well with Prototypes; mypy isn't able to detect the as supporting the Protocol (see: https://github.com/python/mypy/issues/5481). But having an automatically generated DTO could work too.

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. pre-commit

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

    Project mention: Building an Image Factory | dev.to | 2026-05-21

    # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: end-of-file-fixer - id: check-merge-conflict - id: trailing-whitespace args: [--markdown-linebreak-ext=md] - id: check-shebang-scripts-are-executable # YAML - id: check-yaml # Cross platform - id: check-case-conflict - id: mixed-line-ending args: [--fix=lf] - repo: local hooks: - id: packer-fmt name: Packer format check entry: packer fmt -check -recursive packer language: system files: ^packer/.*\.pkr\.hcl$ pass_filenames: false - id: shellcheck name: ShellCheck entry: shellcheck language: system types: [shell]

  4. bandit

    Bandit is a tool designed to find common security issues in Python code.

    Project mention: AI Is Breaking Two Vulnerability Cultures — And Vibe Coders Are About to Get Caught in the Middle | dev.to | 2026-05-08

    # .pre-commit-config.yaml - repo: https://github.com/zricethezav/gitleaks rev: v8.18.0 hooks: - id: gitleaks # catches accidental secret commits - repo: https://github.com/PyCQA/bandit rev: 1.7.5 hooks: - id: bandit # catches common Python security antipatterns

  5. isort

    A Python utility / library to sort imports.

  6. pre-commit-hooks

    Some out-of-the-box hooks for pre-commit

    Project mention: Building an Image Factory | dev.to | 2026-05-21

    # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: end-of-file-fixer - id: check-merge-conflict - id: trailing-whitespace args: [--markdown-linebreak-ext=md] - id: check-shebang-scripts-are-executable # YAML - id: check-yaml # Cross platform - id: check-case-conflict - id: mixed-line-ending args: [--fix=lf] - repo: local hooks: - id: packer-fmt name: Packer format check entry: packer fmt -check -recursive packer language: system files: ^packer/.*\.pkr\.hcl$ pass_filenames: false - id: shellcheck name: ShellCheck entry: shellcheck language: system types: [shell]

  7. Pylint

    It's not just a linter that annoys you!

  8. pytype

    A static type analyzer for Python code

    Project mention: Type hints in Python (1) | dev.to | 2025-11-19

    is used with the type checkers such as mypy, pyright, pyre-check, pytype, etc.

  9. pyupgrade

    A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.

  10. Flake8

    flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.

    Project mention: How to Set Up Pre-Commit Hooks for Teams Using AI Coding Assistants | dev.to | 2026-04-19
  11. yamllint

    A linter for YAML files.

    Project mention: Best Online YAML Linter Tools in 2026 | dev.to | 2026-03-25
  12. wemake-python-styleguide

    The strictest and most opinionated python linter ever!

  13. cfn-python-lint

    CloudFormation Linter

  14. prospector

    Inspects Python source files and provides information about type and location of classes, methods etc

  15. cpplint

    Static code checker for C++

  16. godot-gdscript-toolkit

    Independent set of GDScript tools - parser, linter, formatter, and more

  17. pyflakes

    A simple program which checks Python source files for errors

  18. best-of-python-dev

    🏆 A ranked list of awesome python developer tools and libraries. Updated weekly.

  19. gixy

    NGINX configuration static analyzer (by dvershinin)

    Project mention: Gixy: Nginx Configuration Static Analyzer | news.ycombinator.com | 2026-05-21
  20. flake8-bugbear

    A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.

  21. pylama

    Code audit tool for python.

  22. import-linter

    Lint your Python architecture.

  23. autoflake

    Removes unused imports and unused variables as reported by pyflakes

  24. djLint

    ✨ HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Python Linter discussion

Log in or Post with

Python Linter related posts

  • Building an Image Factory

    2 projects | dev.to | 21 May 2026
  • Gixy: Nginx Configuration Static Analyzer

    1 project | news.ycombinator.com | 21 May 2026
  • How I Set Up Claude Code to Work Autonomously Without Letting It Wreck the Codebase

    2 projects | dev.to | 17 May 2026
  • How to Set Up Pre-Commit Hooks for Teams Using AI Coding Assistants

    7 projects | dev.to | 19 Apr 2026
  • I code-reviewed 3 "vibe-coded" PRs last week. Every one had hardcoded API keys. So I built a grader.

    1 project | dev.to | 10 Apr 2026
  • Sourcery vs mypy: Type Checking vs AI Refactoring (2026)

    1 project | dev.to | 9 Apr 2026
  • Sourcery AI Alternatives: 10 Best Code Quality Tools in 2026

    2 projects | dev.to | 8 Apr 2026
  • A note from our sponsor - SaaSHub
    www.saashub.com | 7 Jun 2026
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

What are some of the best open-source Linter projects in Python? This list will help you:

# Project Stars
1 mypy 20,466
2 pre-commit 15,309
3 bandit 8,077
4 isort 6,945
5 pre-commit-hooks 6,568
6 Pylint 5,685
7 pytype 5,037
8 pyupgrade 4,096
9 Flake8 3,795
10 yamllint 3,402
11 wemake-python-styleguide 2,854
12 cfn-python-lint 2,619
13 prospector 2,083
14 cpplint 1,817
15 godot-gdscript-toolkit 1,551
16 pyflakes 1,448
17 best-of-python-dev 1,267
18 gixy 1,168
19 flake8-bugbear 1,116
20 pylama 1,051
21 import-linter 1,053
22 autoflake 957
23 djLint 928

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com

Did you know that Python is
the 1st most popular programming language
based on number of references?