--- id: mypy-strict-kwargs version: "2026.7.19.1" license: MIT License Copyright (c) 2024 Adam Dangoor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) license_treatment: permissive maintenance: active --- # mypy-strict-kwargs — Enforce using keyword arguments where possible. License: permissive · Maintenance: active · Downloads: 150.7K/mo ## What it is and what it does mypy-strict-kwargs is a mypy plugin that enforces a code-style rule: all function calls must use keyword arguments rather than positional or mixed forms. When enabled, calling a function like `add(1, 2)` will trigger a type error; only `add(a=1, b=2)` is accepted. This is similar in spirit to code formatters like Black—it removes the need to debate call conventions and ensures consistency across a codebase. The plugin is configured via mypy's standard configuration files (pyproject.toml, mypy.ini, or setup.cfg) and supports an ignore list for functions where keyword arguments are impractical (e.g., builtins like `str()`). It depends only on mypy and has low install friction. The maintainer is active, with recent releases supporting Python 3.11 through 3.14. Use it for: - Enforce consistent call style across a team codebase to reduce code-review friction over positional vs. keyword arguments. - Improve error messages from mypy by ensuring named arguments, which report argument name rather than position in type mismatches. - Gradually migrate a legacy codebase toward keyword-only calls without manual refactoring by catching violations at type-check time. - Prevent accidental positional-argument bugs when function signatures change and arguments are reordered. - Standardize on a single call convention for functions with many parameters to improve readability. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A mypy plugin that enforces keyword-argument-only calls to functions, rejecting positional and mixed argument styles during type checking. Yes, if your team values consistent call conventions and you already use mypy. Install friction is minimal, maintenance is active, and the plugin solves a real style problem without licensing friction. Not worth installing if you don't use mypy or if your codebase relies heavily on positional arguments to builtins or third-party libraries (though the ignore list mitigates this). ## Install pip install mypy-strict-kwargs uv add mypy-strict-kwargs poetry add mypy-strict-kwargs ## Installing mypy-strict-kwargs Before you install: Low friction: pure Python wheel with only mypy as a runtime dependency. Actively maintained with a release 26 days ago; repo is not archived and supports Python 3.11–3.14. License in practice: MIT License permits unrestricted use, modification, and distribution with minimal legal friction. Quickstart: pip install mypy-strict-kwargs # Add to pyproject.toml: # [tool.mypy] # plugins = ["mypy_strict_kwargs"] # Then run mypy normally; it will reject add(1, 2) and require add(a=1, b=2) Requires mypy to be installed and configured; Python 3.11 or later. Verify before relying: - Whether the plugin works with all mypy versions or has specific version constraints beyond what the fact sheet states. - Performance impact when enabled on large codebases. - Interaction with other mypy plugins or type-checking workflows. ## Package facts - License: MIT License Copyright (c) 2024 Adam Dangoor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 150.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mypy plugin keyword arguments, enforce named arguments mypy, strict function call syntax, mypy code style enforcement, positional argument linter, mypy call convention plugin, keyword-only function calls, mypy-plugin, code-style, type-checking [View on SkillFed](https://skillfed.io/packages/mypy-strict-kwargs) · [View on PyPI](https://pypi.org/project/mypy-strict-kwargs/)