Enforce using keyword arguments where possible.
Project description
strict-kwargs
Fast enforcement of keyword arguments at call sites, without mypy or ty plugins.
Companion to mypy-strict-kwargs for teams that type-check with ty (or want a fast standalone linter).
Example
def add(a: int, b: int) -> int:
return a + b
add(a=1, b=2) # OK
add(1, 2) # strict-kwargs error: too many positional arguments
Install
From PyPI:
pip install strict-kwargs
# or
uv tool install strict-kwargs
From source:
cargo install --path .
# or
pip install .
Usage
strict-kwargs . # check a directory
strict-kwargs src/foo.py # check a file
strict-kwargs --project-root . # explicit project root for config
With ty:
ty check
strict-kwargs .
Exit codes: 0 = clean, 1 = violations found, 2 = internal error.
Configuration
In pyproject.toml:
[tool.strict_kwargs]
ignore_names = ["main.func", "builtins.str"]
debug = false
The same ignore_names entries as mypy-strict-kwargs work (fully-qualified names like package.module.func).
Limitations
This tool uses static analysis (Ruff's Python parser), not a type checker. It resolves many calls within a project but will not catch every case mypy's plugin handles (dynamic callables, complex overloads, etc.).
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strict_kwargs-2026.5.16.post1-py3-none-win_amd64.whl.
File metadata
- Download URL: strict_kwargs-2026.5.16.post1-py3-none-win_amd64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
765c02602099e7e1227dda8654f083e61c1f6e25003fac0fb57ef8dcea3c1a1f
|
|
| MD5 |
84f3653c6b8b775861b066d12155177e
|
|
| BLAKE2b-256 |
99dcbb095522304b5c17f75a73c46d3aafdc25d1f2ea476bda5a27c861d282bb
|
Provenance
The following attestation bundles were made for strict_kwargs-2026.5.16.post1-py3-none-win_amd64.whl:
Publisher:
release.yml on adamtheturtle/strict-kwargs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strict_kwargs-2026.5.16.post1-py3-none-win_amd64.whl -
Subject digest:
765c02602099e7e1227dda8654f083e61c1f6e25003fac0fb57ef8dcea3c1a1f - Sigstore transparency entry: 1554457204
- Sigstore integration time:
-
Permalink:
adamtheturtle/strict-kwargs@9d46f73427ea517da18b8e95df741f0929fc600d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adamtheturtle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9d46f73427ea517da18b8e95df741f0929fc600d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file strict_kwargs-2026.5.16.post1-py3-none-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: strict_kwargs-2026.5.16.post1-py3-none-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a47335d8e205b1473dc27067768cc8fe0026421f5ddaddb8ee885923f75619c6
|
|
| MD5 |
fc50af19d6dcc683e80bd6aaee2980c3
|
|
| BLAKE2b-256 |
d3daa5f0691873ae35dfd43aa4d56d001105e57c2ca1ed578b2565d4e6407e96
|
Provenance
The following attestation bundles were made for strict_kwargs-2026.5.16.post1-py3-none-manylinux_2_34_x86_64.whl:
Publisher:
release.yml on adamtheturtle/strict-kwargs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strict_kwargs-2026.5.16.post1-py3-none-manylinux_2_34_x86_64.whl -
Subject digest:
a47335d8e205b1473dc27067768cc8fe0026421f5ddaddb8ee885923f75619c6 - Sigstore transparency entry: 1554406078
- Sigstore integration time:
-
Permalink:
adamtheturtle/strict-kwargs@650d61077e47dd9c1742abe268a8679166e5f887 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adamtheturtle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@650d61077e47dd9c1742abe268a8679166e5f887 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file strict_kwargs-2026.5.16.post1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: strict_kwargs-2026.5.16.post1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43c850f3ea3d650d490d08fc4c78837aa7d83426ecec1973b374aacb0211c63b
|
|
| MD5 |
6482326d3986a1054fb78ce112094993
|
|
| BLAKE2b-256 |
1773f305bb704dad1f408b0beeee1dfc2c1436a4f8f22ca9c1c29cd359cd370d
|
Provenance
The following attestation bundles were made for strict_kwargs-2026.5.16.post1-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on adamtheturtle/strict-kwargs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strict_kwargs-2026.5.16.post1-py3-none-macosx_11_0_arm64.whl -
Subject digest:
43c850f3ea3d650d490d08fc4c78837aa7d83426ecec1973b374aacb0211c63b - Sigstore transparency entry: 1554457172
- Sigstore integration time:
-
Permalink:
adamtheturtle/strict-kwargs@9d46f73427ea517da18b8e95df741f0929fc600d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adamtheturtle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9d46f73427ea517da18b8e95df741f0929fc600d -
Trigger Event:
workflow_dispatch
-
Statement type: