strict-kwargs
Enforce using keyword arguments where possible.
What it is and what it does
strict-kwargs is a standalone linter written in Rust that enforces the use of keyword arguments in Python function calls. It scans Python code and reports violations where functions are called with positional arguments instead of named ones, then optionally rewrites them automatically. The tool is designed to improve code clarity and enable better error messages from type checkers by making argument intent explicit.
It runs as a CLI tool and integrates with pre-commit, pyproject.toml configuration, and supports multiple output formats (Ruff-style diagnostics, JSON, GitHub Actions annotations). The tool depends only on ty for runtime and supports Python 3.11 through 3.14. It includes a caching system, suppression via noqa comments, and configurable exclusions for generated or vendored code.
Use it for:
- Enforce consistent function call style across a codebase to prevent ambiguous positional argument calls.
- Automatically rewrite existing positional arguments to keyword form during refactoring.
- Integrate into pre-commit hooks to catch violations before code review.
- Improve type checker error messages by ensuring all arguments are named.
- Configure project-wide rules via pyproject.toml to skip specific functions like builtins.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A standalone CLI linter that enforces keyword arguments in Python function calls, with automatic rewriting support for positional arguments.
Yes, if you use ty for type checking or prefer a standalone linter without plugins. The tool is actively maintained, has no known vulnerabilities, and solves a real code-clarity problem with automatic fixes. Medium install friction (platform-specific wheels, Python 3.11+ requirement) is manageable for most projects. Start with a trial run on your codebase using --diff to preview changes.
Install
strict-kwargs on PyPI
pip
pip install strict-kwargsuv
uv add strict-kwargspoetry
poetry add strict-kwargsInstalling strict-kwargs
Before you install
Medium install friction due to platform-specific wheels (macOS ARM64, manylinux, Windows). Active maintenance with recent releases; last commit 2026-08-13. Requires Python 3.11 or later.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install strict-kwargs
strict-kwargs check .
strict-kwargs check --fix .
Requires Python 3.11 or later. Implemented in Rust; platform-specific wheels are provided.
Verify before relying
- Whether the Rust implementation affects performance on large codebases compared to pure-Python linters.
- How well the tool integrates with existing linting workflows beyond pre-commit.
- Whether synthesized constructor fixes (dataclass, NamedTuple) are safe by default in all projects.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — ty |
| Maintenance | actively maintained — 21 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 152,276/month — #10,907 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: strict_kwargs-2026.7.24-py3-none-macosx_11_0_arm64.whl; strict_kwargs-2026.7.24-py3-none-manylinux_2_39_x86_64.whl; strict_kwargs-2026.7.24-py3-none-win_amd64.whl
Keywords: lint, keyword-arguments, ty, mypy
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
backcallbackcall lets you define and validate callback…
permissive · top 5,000 on PyPI
mypy-strict-kwargsA mypy plugin that enforces…
permissive · top 15,000 on PyPI
overloadingProvides function and method overloading based…
permissive · top 15,000 on PyPI
wemake-python-styleguideA flake8 plugin that enforces strict,…
permissive · top 15,000 on PyPI
import-linterImport Linter enforces architectural…
permissive · top 5,000 on PyPI
gitlint-coreLints Git commit messages against configurable…
permissive · top 5,000 on PyPI
flake8-noqaA flake8 plugin that validates the formatting…
copyleft · top 5,000 on PyPI
flake8Flake8 is a command-line tool that combines…
permissive · top 1,000 on PyPI
tyA fast Python type checker and language server…
permissive · top 1,000 on PyPI