Verifying Python changes
Files: .py, .pyi. Derived from 64 scanned source repositories and 707 review prompts on https://awesomereviewers.com. Page: https://awesomereviewers.com/verify/python/
How to use this: run every check under Run on every change. Then, for each section under Add when the change touches that describes your diff, run its checks too. Checks catch what a tool can find; then apply the listed review prompts for what tools miss (fetch each prompt’s raw URL).
Usage is the share of scanned repositories in this language that run the tool. A missing tool means no scanned repository runs one the scanner recognises: fall back to the prompts.
Run on every change
- Formatting:
ruff-format (50% of repos). Command seen: ruff format .. Autofixes. Exit codes: 0 already formatted; 1 files would be reformatted (–check); 2 error. Alternatives: black (14%), isort (12%). Docs: https://docs.astral.sh/ruff/formatter/#exit-codes
- Linting:
ruff-check (72% of repos). Command seen: ruff check .. Autofixes. Exit codes: 0 no violations; 1 violations found; 2 invalid configuration, CLI options or internal error. Alternatives: flake8 (20%), pylint (12%). Docs: https://docs.astral.sh/ruff/linter/#exit-codes
- Type checking:
mypy (42% of repos). Command seen: mypy. Exit codes: 0 no type errors; 1 type errors found; 2 crash or invalid invocation. Alternatives: pyright (17%). Docs: https://mypy.readthedocs.io/en/stable/command_line.html
- Unit and integration tests:
pytest (86% of repos). Command seen: pytest. Exit codes: 0 all tests passed; 1 some tests failed; 2 interrupted by the user; 3 internal error; 4 command line usage error; 5 no tests were collected. Alternatives: unittest (12%). Docs: https://docs.pytest.org/en/stable/reference/exit-codes.html
Review prompts (111 in total, most discussed first):
- Use descriptive names — strands-agents/sdk-python, Naming Conventions
- Consistent module organization — p-e-w/heretic, Code Style
- Avoid code duplication — BerriAI/litellm, Code Style
- eliminate unnecessary code — Unstructured-IO/unstructured, Code Style
- Readable formatting and idioms — celery/celery, Code Style
- eliminate code duplication — sgl-project/sglang, Code Style
- Use semantically clear names — Unstructured-IO/unstructured, Naming Conventions
- Eliminate redundant constructs — apache/mxnet, Code Style
- Centralize shared utilities — awslabs/mcp, Code Style
- Collision-Safe Identifier Mapping — nousresearch/hermes-agent, Naming Conventions
- Idiomatic, minimal Python constructs — pallets/flask, Code Style
- Use clear names — p-e-w/heretic, Naming Conventions
Add when the change touches
- Security scanning:
codeql (28% of repos). Runs via GitHub Action github/codeql-action/analyze. Alternatives: bandit (9%), semgrep (8%). Docs: https://github.com/github/codeql
- Secret scanning:
gitleaks (2% of repos). Runs via pre-commit hook gitleaks. Docs: https://github.com/gitleaks/gitleaks
- Dependency audit:
dependency-review (8% of repos). Runs via GitHub Action actions/dependency-review-action. Alternatives: pip-audit (3%). Docs: https://github.com/actions/dependency-review-action
Review prompts (48 in total, most discussed first):
- Prevent sensitive data exposure — bridgecrewio/checkov, Security
- Protect sensitive data — bridgecrewio/checkov, Security
- Boundary Hardening Rules — nousresearch/hermes-agent, Security
- Fail-Closed Input Sanitization — awslabs/mcp, Security
- Secure Untrusted Boundaries — Azure/azure-cli, Security
- Trust Boundaries And Safe Parsing — the-pr-agent/pr-agent, Security
- Secure Auth and Logging — openai/openai-python, Security
- Sanitize Untrusted Boundaries — mvanhorn/last30days-skill, Security
- Centralized input guards — infiniflow/ragflow, Security
- Validate user-controlled paths — apache/airflow, Security
- Least privilege principle — prowler-cloud/prowler, Security
- Defensive Security Validation — openai/codex-security, Security
Public APIs, signatures, error paths, nullability
- Type checking:
mypy (42% of repos). Command seen: mypy. Exit codes: 0 no type errors; 1 type errors found; 2 crash or invalid invocation. Alternatives: pyright (17%). Docs: https://mypy.readthedocs.io/en/stable/command_line.html
- Unit and integration tests:
pytest (86% of repos). Command seen: pytest. Exit codes: 0 all tests passed; 1 some tests failed; 2 interrupted by the user; 3 internal error; 4 command line usage error; 5 no tests were collected. Alternatives: unittest (12%). Docs: https://docs.pytest.org/en/stable/reference/exit-codes.html
- Property-based tests:
hypothesis (14% of repos). Docs: https://github.com/HypothesisWorks/hypothesis
Review prompts (167 in total, most discussed first):
- Actionable Error Propagation — Azure/azure-cli, Error Handling
- Avoid silent error masking — awslabs/mcp, Error Handling
- Exception Handling Policy — the-pr-agent/pr-agent, Error Handling
- Validate Inputs Explicitly — TheAlgorithms/Python, Error Handling
- Surface errors clearly — p-e-w/heretic, Error Handling
- explicit None handling — Unstructured-IO/unstructured, Null Handling
- Deterministic exception handling — celery/celery, Error Handling
- Safe null handling — langgenius/dify, Null Handling
- Null-safe Defaults — the-pr-agent/pr-agent, Null Handling
- Use Null-Safe Config Reads — nousresearch/hermes-agent, Null Handling
- Accurate API Contracts — awslabs/mcp, API
- Standardize Typed Errors — openai/openai-python, Error Handling
Service and framework code
- Unit and integration tests:
pytest (86% of repos). Command seen: pytest. Exit codes: 0 all tests passed; 1 some tests failed; 2 interrupted by the user; 3 internal error; 4 command line usage error; 5 no tests were collected. Alternatives: unittest (12%). Docs: https://docs.pytest.org/en/stable/reference/exit-codes.html
- Version and platform matrix:
ci-matrix (56% of repos). Command seen: analyze (include: 2). Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations
Review prompts (6 in total, most discussed first):
- Property-based tests:
hypothesis (14% of repos). Docs: https://github.com/HypothesisWorks/hypothesis
- Fuzzing — no tool detected in the sample. Catches: Crashes, panics and hangs on malformed input, especially in parsers and decoders.
- Mutation testing:
mutmut (2% of repos). Command seen: mutmut run 2>&1. Docs: https://github.com/boxed/mutmut
- Proofs and specifications:
lean (2% of repos). Docs: https://github.com/leanprover/lean4
Review prompts (47 in total, most discussed first):
- Choose optimal algorithms — bridgecrewio/checkov, Algorithms
- Deterministic Algorithm Correctness — langchain-ai/langchain, Algorithms
- optimize algorithmic efficiency — python-poetry/poetry, Algorithms
- Prevent algorithmic pitfalls — boto/boto3, Algorithms
- Precise Matching Rules — nousresearch/hermes-agent, Algorithms
- Algorithm Correctness Standards — TheAlgorithms/Python, Algorithms
- implement algorithms correctly — stanfordnlp/dspy, Algorithms
- Optimize iteration patterns — apache/mxnet, Algorithms
- Verify algorithmic equivalence — python/cpython, Algorithms
- Consistent, Guarded Ranking — mvanhorn/last30days-skill, Algorithms
- Deterministic Mapping Pipeline — infiniflow/ragflow, Algorithms
- Optimization algorithm compatibility — p-e-w/heretic, Algorithms
Threads, async code, locks, shared state
- Concurrency model checking — no tool detected in the sample. Catches: Races and orderings that fail only under specific interleavings.
- Undefined-behaviour detection — no tool detected in the sample. Catches: Memory-safety and aliasing violations in unsafe code.
- Property-based tests:
hypothesis (14% of repos). Docs: https://github.com/HypothesisWorks/hypothesis
Review prompts (30 in total, most discussed first):
- Nonblocking Concurrency Rules — nousresearch/hermes-agent, Concurrency
- Avoid shared mutable state — langchain-ai/langchain, Concurrency
- Thread-safe lifecycle isolation — celery/celery, Concurrency
- Safe Async Resource Handling — awslabs/mcp, Concurrency
- Avoid event-loop blocking — openai/openai-python, Concurrency
- Choose appropriate synchronization — strands-agents/sdk-python, Concurrency
- Ensure operation completion safety — LMCache/LMCache, Concurrency
- Non-Blocking Async Recovery — infiniflow/ragflow, Concurrency
- Concurrent resource management — langgenius/dify, Concurrency
- Deterministic concurrency tests — python/cpython, Concurrency
- use context managers concurrency — commaai/openpilot, Concurrency
- background task coordination — BerriAI/litellm, Concurrency
Network calls, retries, timeouts, protocols
- Unit and integration tests:
pytest (86% of repos). Command seen: pytest. Exit codes: 0 all tests passed; 1 some tests failed; 2 interrupted by the user; 3 internal error; 4 command line usage error; 5 no tests were collected. Alternatives: unittest (12%). Docs: https://docs.pytest.org/en/stable/reference/exit-codes.html
- Fuzzing — no tool detected in the sample. Catches: Crashes, panics and hangs on malformed input, especially in parsers and decoders.
Review prompts (10 in total, most discussed first):
- Restrict public access — bridgecrewio/checkov, Networking
- Restrict public network — bridgecrewio/checkov, Networking
- Configure HTTP requests properly — python-poetry/poetry, Networking
- Preserve protocol semantics — python/cpython, Networking
- Robust aiohttp Networking — openai/openai-python, Networking
- HTTP protocol correctness — pallets/flask, Networking
- Manage network resources — anthropics/anthropic-sdk-python, Networking
- network service identification — LMCache/LMCache, Networking
- validate connection timeouts — browser-use/browser-use, Networking
- Platform-specific socket configuration — commaai/openpilot, Networking
UI components and pages
- End-to-end browser tests — no tool detected in the sample. Catches: User flows broken across components, routing and the network.
- Linting:
ruff-check (72% of repos). Command seen: ruff check .. Autofixes. Exit codes: 0 no violations; 1 violations found; 2 invalid configuration, CLI options or internal error. Alternatives: flake8 (20%), pylint (12%). Docs: https://docs.astral.sh/ruff/linter/#exit-codes
Databases, migrations, caching
- Unit and integration tests:
pytest (86% of repos). Command seen: pytest. Exit codes: 0 all tests passed; 1 some tests failed; 2 interrupted by the user; 3 internal error; 4 command line usage error; 5 no tests were collected. Alternatives: unittest (12%). Docs: https://docs.pytest.org/en/stable/reference/exit-codes.html
- Version and platform matrix:
ci-matrix (56% of repos). Command seen: analyze (include: 2). Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations
Review prompts (34 in total, most discussed first):
- SQLAlchemy 2.0 patterns — langgenius/dify, Database
- Cache Scope and Keys — nousresearch/hermes-agent, Caching
- Safe caching practices — langchain-ai/langchain, Caching
- Credential-Aware Caching — awslabs/mcp, Caching
- Cache invalidation consistency — PostHog/posthog, Caching
- Use connection by alias — django/django, Database
- Cache validity and bounds — openai/openai-python, Caching
- Cache state consistency — LMCache/LMCache, Caching
- Prevent N+1 database queries — getsentry/sentry, Database
- Cache Only After Inputs — celery/celery, Caching
- Optimize cache performance — sgl-project/sglang, Caching
- Split complex migrations incrementally — PostHog/posthog, Migrations
- No tool-based check applies; rely on the prompts.
Review prompts (36 in total, most discussed first):
- Avoid Unnecessary Work — celery/celery, Performance Optimization
- Bounded Hot-Path Work — nousresearch/hermes-agent, Performance Optimization
- Bound Work and Queries — infiniflow/ragflow, Performance Optimization
- Manage tensors proactively — p-e-w/heretic, Performance Optimization
- Eliminate redundant operations — sgl-project/sglang, Performance Optimization
- Vectorize over Python loops — vllm-project/vllm, Performance Optimization
- Budget-Aware Performance — the-pr-agent/pr-agent, Performance Optimization
- Enforce Resource Caps — awslabs/mcp, Performance Optimization
- Performance-Sensitive Efficiency — TheAlgorithms/Python, Performance Optimization
- Optimize hot-path code — python/cpython, Performance Optimization
- Avoid Hidden Performance Traps — langchain-ai/langchain, Performance Optimization
- Cache expensive operations — PostHog/posthog, Performance Optimization
Model, prompt and LLM code
- Unit and integration tests:
pytest (86% of repos). Command seen: pytest. Exit codes: 0 all tests passed; 1 some tests failed; 2 interrupted by the user; 3 internal error; 4 command line usage error; 5 no tests were collected. Alternatives: unittest (12%). Docs: https://docs.pytest.org/en/stable/reference/exit-codes.html
Review prompts (40 in total, most discussed first):
- Model integration rules — p-e-w/heretic, AI
- prefer OpenAI compatibility — BerriAI/litellm, AI
- Improve code organization — sgl-project/sglang, AI
- Device-agnostic acceleration code — pytorch/pytorch, AI
- Avoid magic numbers — vllm-project/vllm, AI
- Fail-closed evaluation metrics — promptfoo/promptfoo, AI
- Model-Safe Parameter Validation — the-pr-agent/pr-agent, AI
- Preserve AI Structure Invariants — langchain-ai/langchain, AI
- Handle optional dependencies gracefully — stanfordnlp/dspy, AI
- leverage existing framework functionality — ggml-org/llama.cpp, AI
- LLM Interface Contracts — awslabs/mcp, AI
- preserve dtype and shapes — p-e-w/heretic, Pytorch
Logging, metrics, tracing
- No tool-based check applies; rely on the prompts.
Review prompts (26 in total, most discussed first):
- Scoped, Accurate Warning Logs — Azure/azure-cli, Logging
- Logging Correctness Rules — celery/celery, Logging
- Follow logging best practices — vllm-project/vllm, Logging
- Logging consistency and safety — the-pr-agent/pr-agent, Logging
- Use appropriate log levels — langgenius/dify, Logging
- Use appropriate logging levels — home-assistant/core, Logging
- Use proper logging mechanisms — BerriAI/litellm, Logging
- Structure logs with context — getsentry/sentry, Logging
- Sanitize observability data exports — open-telemetry/opentelemetry-python, Observability
- Add logging without duplication — docker/compose, Logging
- Structure logs effectively — django/django, Logging
- Use appropriate logging levels — bridgecrewio/checkov, Logging
CI workflows and configuration files
- CI workflow linting — no tool detected in the sample. Catches: Broken GitHub Actions syntax, script injection, over-broad token permissions.
- File hygiene:
pre-commit-hooks (39% of repos). Runs via pre-commit hook end-of-file-fixer. Autofixes. Docs: https://github.com/pre-commit/pre-commit-hooks
Review prompts (68 in total, most discussed first):
- Configuration ownership and determinism — p-e-w/heretic, Configurations
- Centralized Config Standards — eosphoros-ai/DB-GPT, Configurations
- Centralize environment variables — bridgecrewio/checkov, Configurations
- validate configuration defaults — Unstructured-IO/unstructured, Configurations
- Use configurable default values — prowler-cloud/prowler, Configurations
- Explicit config behavior — celery/celery, Configurations
- Robust environment config handling — pallets/flask, Configurations
- Language-agnostic configuration design — oraios/serena, Configurations
- Config.yaml First Policy — nousresearch/hermes-agent, Configurations
- Region configuration consistency — awslabs/mcp, Configurations
- Optional configuration parameters — stanfordnlp/dspy, Configurations
- Feature flag rollouts — getsentry/sentry, Configurations
Dependencies and lockfiles
- Dependency audit:
dependency-review (8% of repos). Runs via GitHub Action actions/dependency-review-action. Alternatives: pip-audit (3%). Docs: https://github.com/actions/dependency-review-action
- Lockfile consistency:
uv-lock (20% of repos). Command seen: uv lock --check. Autofixes. Docs: https://github.com/astral-sh/uv
- Version and platform matrix:
ci-matrix (56% of repos). Command seen: analyze (include: 2). Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations
The tests themselves
- Mutation testing:
mutmut (2% of repos). Command seen: mutmut run 2>&1. Docs: https://github.com/boxed/mutmut
- Version and platform matrix:
ci-matrix (56% of repos). Command seen: analyze (include: 2). Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations
Review prompts (52 in total, most discussed first):
- Thorough edge-case verification — python/cpython, Testing
- Mock tests in tests/litellm — BerriAI/litellm, Testing
- Parameterize similar tests — python-poetry/poetry, Testing
- Mock external dependencies only — home-assistant/core, Testing
- Automate All Behavior Tests — TheAlgorithms/Python, Testing
- Behavioral Regression Testing — nousresearch/hermes-agent, Testing
- Prefer Robust Testing Assertions — langchain-ai/langchain, Testing
- Write clear test cases — Unstructured-IO/unstructured, Testing
- Use idiomatic pytest features — pallets/flask, Testing
- Deterministic recorded testing — Azure/azure-cli, Testing
- Meaningful Tests For Guards — celery/celery, Testing
- Write self-documenting tests — boto/boto3, Testing
- Docs build:
sphinx (12% of repos). Command seen: sphinx-build -j2 -b configcheck -d {envtmpdir}/doctrees docs docs/_build/configcheck. Alternatives: mkdocs (6%). Docs: https://github.com/sphinx-doc/sphinx
- Spelling:
codespell (25% of repos). Command seen: codespell --toml pyproject.toml --write. Docs: https://github.com/codespell-project/codespell
Review prompts (32 in total, most discussed first):
- Docstring Standards — TheAlgorithms/Python, Documentation
- Docstrings With Intent — langchain-ai/langchain, Documentation
- PEP 257 docstring compliance — Unstructured-IO/unstructured, Documentation
- Document code thoroughly — vllm-project/vllm, Documentation
- Concise, Correct CLI Help — Azure/azure-cli, Documentation
- Document Behavior Changes — celery/celery, Documentation
- Document Behavior Accurately — awslabs/mcp, Documentation
- Complete parameter documentation — stanfordnlp/dspy, Documentation
- Document code rationale — pydantic/pydantic, Documentation
- Write purposeful comments — open-telemetry/opentelemetry-python, Documentation
- Comprehensive API documentation — boto/boto3, Documentation
- Accurate, synced documentation — python/cpython, Documentation
Source repositories
nousresearch/hermes-agent, TheAlgorithms/Python, tensorflow/tensorflow, langchain-ai/langchain, langgenius/dify, langflow-ai/langflow, pytorch/pytorch, fastapi/fastapi, django/django, comfyanonymous/ComfyUI, home-assistant/core, infiniflow/ragflow, python/cpython, microsoft/markitdown, pallets/flask, TauricResearch/TradingAgents, browser-use/browser-use, commaai/openpilot, mvanhorn/last30days-skill, karpathy/nanochat, vllm-project/vllm, calesthio/OpenMontage, getsentry/sentry, apache/airflow, docker/compose, Aider-AI/aider, pola-rs/polars, crewaiinc/crewai, python-poetry/poetry, openai/openai-python, celery/celery, PostHog/posthog, BerriAI/litellm, stanfordnlp/dspy, pydantic/pydantic, apache/mxnet, eosphoros-ai/DB-GPT, agent0ai/agent-zero, sgl-project/sglang, SWE-agent/SWE-agent, bytedance/deer-flow, oraios/serena, semgrep/semgrep, the-pr-agent/pr-agent, emcie-co/parlant, Unstructured-IO/unstructured, prowler-cloud/prowler, huggingface/tokenizers, awslabs/mcp, boto/boto3, openai/codex-security, bytedance/trae-agent, openai/skills, bridgecrewio/checkov, p-e-w/heretic, Azure/azure-cli, strands-agents/sdk-python, LMCache/LMCache, anthropics/anthropic-sdk-python, awslabs/agentcore-samples, smallcloudai/refact, anthropics/claude-agent-sdk-python, salesforce/cloudsplaining, open-telemetry/opentelemetry-python