Skip to main content

pr-tests release-on-merge PyPI version codecov

Flake8 Keyword Arguments with Spaces Plugin

The flake8-kwargs-spaces package is a plugin for Flake8 that enforces consistent spacing around the equals sign (=) in function arguments, in both definitions and calls. By integrating this plugin, developers can ensure uniform code formatting and adherence to style guidelines.

Rules

  • Multiline: When a keyword argument or default is on its own line (e.g. one argument under the def or call), use spaces around = → key = 'val'. Violations are reported as EKS100.
  • Inline: When the argument is on the same line as the def/call, or when multiple keyword arguments appear on the same line, use no spaces around = → key='val'. Violations are reported as EKS251.

Anti-pattern

def foo(
    key='val'
):
    return key


foo(
    key='val'
)

Best practice

def foo(
    key = 'val'
):
    return key


foo(
    key = 'val'
)

Still anti-pattern

def foo(key = 'val'):
    return key


foo(key = 'val')

Still best practice

def foo(key='val'):
    return key


foo(key='val')

Installation

From PyPI (once published):

pip install flake8-kwargs-spaces

From source (development or before first publish):

  1. Clone the repository and enter it:

    git clone git@github.com:sahargavriely/flake8-kwargs-spaces.git
    cd flake8-kwargs-spaces
    
  2. Run the installation script, then activate the virtual environment:

    ./scripts/install.sh
    source venv/bin/activate
    
  3. (Optional) Run the test suite to verify everything works:

    pytest tests/
    
  4. The install script builds a wheel under wheels/. To use the plugin with Flake8, install that wheel in the environment where you want the plugin enforced:

    pip install ./wheels/flake8_kwargs_spaces-*.whl
    
  5. To avoid conflicts with Flake8’s built-in E251 rule, add a setup.cfg (or use your existing one) with:

    [flake8]
    ignore = E251
    
  6. (Optional) Enable pre-commit hooks:

    pre-commit install --hook-type pre-commit --hook-type pre-push
    pre-commit run --all-files
    pre-commit run --hook-stage pre-push --all-files
    

License

MIT. See LICENSE.

Thanks

Metadata

Release files for flake8-kwargs-spaces 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flake8-kwargs-spaces 1.0.7
File Size Uploaded Provenance Actions
flake8_kwargs_spaces-1.0.7.tar.gz 4.8 kB With provenance Details for flake8_kwargs_spaces-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flake8-kwargs-spaces 1.0.7
File Interpreter ABI Platform Actions
flake8_kwargs_spaces-1.0.7-py3-none-any.whl Python 3 none any Details for flake8_kwargs_spaces-1.0.7-py3-none-any.whl

Total release size: 9.9 kB

Release files / flake8_kwargs_spaces-1.0.7.tar.gz

Download URL flake8_kwargs_spaces-1.0.7.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8b91a561281c15cbb9a01691a89d3c077e99137577d0cd455116d50f0d86b451
BLAKE2b-256 checksum
How to use checksums
cbdd92785371fce0d606a7855c6b3193c88f11f84e8aaec2a65fd46e9ebaa5df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / flake8_kwargs_spaces-1.0.7-py3-none-any.whl

Download URL flake8_kwargs_spaces-1.0.7-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffbd85556635bd03fb410975ff3a8e986e0fd3511fa152a796cbbc104e20ef7d
BLAKE2b-256 checksum
How to use checksums
576b53107cb532589ce2487be6356f168692030fcbe4de90f452bc32b2d3ab05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Security for flake8-kwargs-spaces 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for flake8_kwargs_spaces-1.0.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page