skillfed

strict-kwargs

Enforce using keyword arguments where possible.

strict-kwargs v2026.7.24 152.3K downloads/30d#10,907 on PyPI1
Permissive license MIT Active released

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-kwargs

uv

uv add strict-kwargs

poetry

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 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

Development Status :: 4 - BetaEnvironment :: ConsoleLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: RustTopic :: Software Development :: Quality Assurance

Tags

enforce keyword arguments pythonpositional to keyword arguments linterstrict kwargs clipython function call style checkerautomatic keyword argument rewriterpython code quality linterfunction call argument enforcer
lintercode-stylerust-cli

More Quality Assurance packages