أفضل أدوات بايثون للتدقيق والتنسيق وفحص الأنواع
Ruff, Black, mypy, Pyright, pre-commit and other tools that check Python code before it runs
آخر تحديث · GitHub stars (stars)
لماذا هؤلاء العشرون
Ranked by GitHub stars: how many developers bookmarked the project. Stars measure attention, not quality, so each row also shows forks, licence, the last push and the section of the community list it sits in. Formatters (Black, isort), linters (Ruff, pylint, flake8, Bandit for security), type checkers (mypy, Pyright, ty, Pyrefly) and refactoring tools do different jobs and share one list, so check the 'listed under' column. Ruff does the work of several older tools at once, which is part of why it leads; newer type checkers (ty, Pyrefly) are young and still gathering stars. The community list holds fewer than 20 of these tools, so the list is shorter than 20.
-
1
astral-sh/ruff
An extremely fast Python linter and code formatter, written in Rust.
51,468 stars 2,773 forkslast push 2026-11-23RustMIT
موجود أيضًا في: #3 Rust developer tools#1 Rust linters and code quality tools, ranked by GitHub stars
-
2
black
The uncompromising Python code formatter.
42,210 stars 3,092 forkslast push 2026-11-20PythonMIT
-
3
mypy
A static type checker for Python.
20,736 stars 3,492 forkslast push 2026-11-20PythonNOASSERTION
-
4
ty
An extremely fast Python type checker and language server.
20,138 stars 350 forkslast push 2026-11-22PythonMIT
-
5
pyright
Full-featured static type checker for Python from Microsoft, the engine behind Pylance.
15,757 stars 1,856 forkslast push 2026-11-20PythonNOASSERTION
-
6
pre-commit
A framework for managing and maintaining multi-language pre-commit hooks.
15,712 stars 1,116 forkslast push 2026-11-09PythonMIT
-
7
bandit
A tool designed to find common security issues in Python code.
8,401 stars 894 forkslast push 2026-11-09PythonApache-2.0
-
8
isort
A Python utility / library to sort imports.
6,965 stars 844 forkslast push 2026-11-16PythonMIT
-
9
pylint
A fully customizable source code analyzer.
5,749 stars 1,461 forkslast push 2026-11-20PythonGPL-2.0
-
10
vulture
A tool for finding and analyzing dead Python code.
5,005 stars 226 forkslast push 2026-11-16PythonMIT
-
11
-
12
basedpyright
A pyright fork with stricter defaults and Pylance features in its language server.
3,655 stars 139 forkslast push 2026-11-10TypeScriptNOASSERTION
-
13
-
14
-
15
complexipy
Cognitive complexity analysis for Python code, written in Rust.
924 stars 30 forkslast push 2026-11-19RustMIT
قارن جنبًا إلى جنب
| Licence | Platforms | What it does | Python versions | Async support | Type hints | Plugins and ecosystem | Best for | |
|---|---|---|---|---|---|---|---|---|
| MIT License | – | – | – | – | – | – | – | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Uncompromising, deterministic, and opinionated Python code formatter | Runs on Python 3.10+; formats Python 3.3 to 3.15 | Formats async def, await expressions, and asynchronous comprehensions | Formats type annotations and type stub (.pyi) files | Editor plugins, pre-commit integration, blackd HTTP daemon, and GitHub Actions | Enforcing uniform, hands-off code style across teams and projects | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Static type checker for Python based on type annotations | Runs on Python 3.8+; checks Python 3.8 to 3.15 | Type checks coroutines, async generators, awaitables, and asyncio modules | Comprehensive support for PEP 484, PEP 526, and modern typing standards | Custom plugin system, typeshed stubs, dmypy daemon, and pre-commit hooks | Standard static type checking and gradual typing in Python codebases | |
| MIT License | – | – | Python 3.8 to 3.15 (officially targets Python 3.10+) | – | – | – | – | |
| MIT License | Cross-platform (Linux, macOS, Windows via Node.js) | Fast, full-featured static type checker and Python language server | Configurable from Python 3.0 up to 3.14+ | Type checks async functions, coroutine returns, await expressions, and generators | Comprehensive support for PEP typing specifications and strict type validation | Powers Pylance in VS Code, CLI npm package, and LSP | Fast, real-time type checking and language server features in IDEs | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Framework for managing and running multi-language git hook scripts | Runs on Python 3.9+ | Not applicable; runs configured external hooks synchronously or in parallel | Does not check types directly; runs external type checking hooks | Ecosystem of hundreds of community hooks across Python, JS, Rust | Automating pre-commit code verification, formatting, and linting in Git | |
| Apache-2.0 License | Cross-platform (Linux, macOS, Windows) | Security linter designed to find common security issues in Python | Python 3.8+ | Scans async function AST nodes for security vulnerabilities | Ignores type hints; focuses strictly on security flaw AST patterns | Plugin architecture for custom security checks; integrates with pre-commit, CI | Automated security vulnerability scanning and static application security testing (SAST) | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Utility to sort, format, and section Python import statements automatically | Python 3.8+ | Sorts and formats imports regardless of synchronous or asynchronous module usage | Supports sorting typing imports and TYPE_CHECKING conditional import blocks | Integrations with Flake8, Black, pre-commit, VS Code, and Sublime Text | Automating standardized, deterministic sorting of Python imports across files | |
| GPL-2.0-or-later | Cross-platform (Linux, macOS, Windows) | Highly customizable static code analyzer checking bugs, style, and conventions | Python 3.9+ | Checks async functions, await expressions, async context managers, and iterators | Analyzes type annotations and uses AST inference via Astroid library | Extensible plugin architecture (e.g., pylint-django, pylint-celery) and editor integrations | Comprehensive, highly customizable code analysis and enforcing strict coding guidelines | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Finds and reports unused and dead code in Python programs | Python 3.8+ | Detects unused async function definitions, coroutines, and async methods | Parses variable and attribute annotations to avoid flagging them as unused | Pre-commit hook, Flake8 plugin integration, and whitelist generation tools | Detecting and pruning unused functions, classes, and variables from codebases | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Modular Python linter wrapping PyFlakes, pycodestyle, and McCabe complexity | Python 3.8.1+ | Checks async syntax via PyFlakes; extensible via flake8-async plugin | Parses annotations; checks type hints when combined with flake8-annotations plugin | Extensive entry-point plugin ecosystem, pre-commit hooks, and IDE extensions | Modular, lightweight PEP 8 compliance and linting with custom plugins | |
| MIT License | Cross-platform (Linux, macOS, Windows via Node.js/pip) | Pyright fork with stricter default type checking and built-in Pylance features | Runs on Python 3.10+; analyzes Python 3.0+ | Type checks async functions, coroutines, and asynchronous typing rules | Advanced typing features, strict inference, baseline reporting, and unreachable code checking | Language server supporting VS Code, Neovim, Sublime Text, and pre-commit | Strict, comprehensive static type checking without proprietary Pylance restrictions | |
| LGPL-3.0-or-later | Cross-platform (Linux, macOS, Windows) | Python refactoring library for safe renamings, extractions, and code restructurings | Python 3.8+ (supports Python syntax up to 3.15) | Refactors and transforms async functions, methods, and await expressions | Uses type annotations and docstrings to inform refactoring and inference | Integrates into python-lsp-server (pylsp), Vim, Emacs, and custom scripts | Programmatic refactoring, code reorganization, and LSP refactoring backends | |
| GPL-2.0-only | Cross-platform (Linux, macOS, Windows) | Aggregates and unifies outputs from multiple Python static analysis tools | Python 3.8+ | Analyzes async code via underlying engines including Pylint and PyFlakes | Provides static type checking by integrating optional Mypy tool support | Wraps Pylint, pycodestyle, McCabe, pyflakes, Bandit, Mypy, and framework adaptors | Zero-configuration, all-in-one Python code quality analysis combining multiple linters | |
| MIT License | Cross-platform (Linux, macOS, Windows) | Fast cognitive complexity analyzer for Python code written in Rust | Python 3.8 to 3.15 | Calculates cognitive complexity across async functions, loops, and async comprehensions | Ignores type checking; cleanly parses annotated syntax without metric impact | GitHub Actions, pre-commit hook, CLI, and JSON/CSV output formats | Enforcing cognitive complexity thresholds to keep Python functions easily understandable |
كل خانة مأخوذة من موقع الأداة أو وثائقها أو مستودعها؛ الصفحات في المراجع.
المراجع
- vinta/awesome-python: Code Analysis, GitHub community list (list text CC BY 4.0; star counts from the GitHub API). Checked 2026-11-23 16:43 UTC.
- vinta/awesome-python (Code Analysis), GitHub community list, 17 tools with a public repository.
- astral-sh/ruff: licence, github.com, checked 2026-11-15.
- black: licence, github.com, checked 2026-11-15.
- black: platforms, black.readthedocs.io, checked 2026-11-15.
- black: what it does, black.readthedocs.io, checked 2026-11-15.
- black: async support, black.readthedocs.io, checked 2026-11-15.
- black: type hints, black.readthedocs.io, checked 2026-11-15.
- black: plugins and ecosystem, black.readthedocs.io, checked 2026-11-15.
- mypy: licence, github.com, checked 2026-11-15.
- mypy: platforms, mypy.readthedocs.io, checked 2026-11-15.
- mypy: what it does, mypy.readthedocs.io, checked 2026-11-15.
- mypy: python versions, mypy.readthedocs.io, checked 2026-11-15.
- mypy: async support, mypy.readthedocs.io, checked 2026-11-15.
- mypy: type hints, mypy.readthedocs.io, checked 2026-11-15.
- mypy: plugins and ecosystem, mypy.readthedocs.io, checked 2026-11-15.
- ty: licence, github.com, checked 2026-11-15.
- ty: python versions, github.com, checked 2026-11-15.
- pyright: licence, github.com, checked 2026-11-15.
- pyright: platforms, microsoft.github.io, checked 2026-11-15.
- pyright: what it does, microsoft.github.io, checked 2026-11-15.
- pyright: python versions, microsoft.github.io, checked 2026-11-15.
- pyright: async support, microsoft.github.io, checked 2026-11-15.
- pyright: type hints, microsoft.github.io, checked 2026-11-15.
- pre-commit: licence, github.com, checked 2026-11-15.
- pre-commit: platforms, pre-commit.com, checked 2026-11-15.
- pre-commit: what it does, pre-commit.com, checked 2026-11-15.
- pre-commit: python versions, github.com, checked 2026-11-15.
- pre-commit: type hints, pre-commit.com, checked 2026-11-15.
- bandit: licence, github.com, checked 2026-11-15.
- bandit: platforms, bandit.readthedocs.io, checked 2026-11-15.
- bandit: python versions, github.com, checked 2026-11-15.
- bandit: async support, bandit.readthedocs.io, checked 2026-11-15.
- pyrefly: licence, github.com, checked 2026-11-15.
- pyrefly: platforms, pyrefly.org, checked 2026-11-15.
- pyrefly: python versions, github.com, checked 2026-11-15.
- pyrefly: type hints, pyrefly.org, checked 2026-11-15.
- isort: licence, github.com, checked 2026-11-15.
- isort: platforms, pycqa.github.io, checked 2026-11-15.
- isort: python versions, github.com, checked 2026-11-15.
- isort: type hints, pycqa.github.io, checked 2026-11-15.
- pylint: licence, github.com, checked 2026-11-15.
- pylint: platforms, pylint.readthedocs.io, checked 2026-11-15.
- pylint: python versions, pylint.readthedocs.io, checked 2026-11-15.
- pylint: async support, pylint.readthedocs.io, checked 2026-11-15.
- pylint: plugins and ecosystem, pylint.readthedocs.io, checked 2026-11-15.
- vulture: licence, github.com, checked 2026-11-15.
- vulture: platforms, github.com, checked 2026-11-15.
- vulture: python versions, github.com, checked 2026-11-15.
- flake8: licence, github.com, checked 2026-11-15.
- flake8: platforms, flake8.pycqa.org, checked 2026-11-15.
- flake8: plugins and ecosystem, flake8.pycqa.org, checked 2026-11-15.
- basedpyright: licence, github.com, checked 2026-11-15.
- basedpyright: platforms, github.com, checked 2026-11-15.
- basedpyright: what it does, docs.basedpyright.com, checked 2026-11-15.
- basedpyright: python versions, github.com, checked 2026-11-15.
- rope: licence, github.com, checked 2026-11-15.
- rope: platforms, rope.readthedocs.io, checked 2026-11-15.
- rope: python versions, github.com, checked 2026-11-15.
- prospector: licence, github.com, checked 2026-11-15.
- prospector: platforms, prospector.readthedocs.io, checked 2026-11-15.
- prospector: async support, prospector.readthedocs.io, checked 2026-11-15.
- import-linter: licence, github.com, checked 2026-11-15.
- import-linter: platforms, import-linter.readthedocs.io, checked 2026-11-15.
- import-linter: python versions, github.com, checked 2026-11-15.
- import-linter: plugins and ecosystem, import-linter.readthedocs.io, checked 2026-11-15.
- complexipy: licence, github.com, checked 2026-11-15.
- complexipy: platforms, complexipy.com, checked 2026-11-15.
- complexipy: python versions, github.com, checked 2026-11-15.
- complexipy: plugins and ecosystem, github.com, checked 2026-11-15.