--- id: strict-kwargs version: "2026.7.24" license: MIT license_treatment: permissive maintenance: active --- # strict-kwargs — Enforce using keyword arguments where possible. License: permissive · Maintenance: active · Downloads: 152.3K/mo ## 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 above — 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 pip install strict-kwargs uv add strict-kwargs poetry add strict-kwargs ## Installing 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_current - Install friction: medium - Maintenance: active - Downloads: 152.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags enforce keyword arguments python, positional to keyword arguments linter, strict kwargs cli, python function call style checker, automatic keyword argument rewriter, python code quality linter, function call argument enforcer, linter, code-style, rust-cli [View on SkillFed](https://skillfed.io/packages/strict-kwargs) · [View on PyPI](https://pypi.org/project/strict-kwargs/)