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

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.8
File Size Uploaded Provenance Actions
flake8_kwargs_spaces-1.0.8.tar.gz 4.8 kB With provenance Details for flake8_kwargs_spaces-1.0.8.tar.gz

Built distribution (wheel)

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

Total release size: 10.0 kB

Release files / flake8_kwargs_spaces-1.0.8.tar.gz

Download URL flake8_kwargs_spaces-1.0.8.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8617756eb1057463e377512e34edcfd1b7891671bff2c2cfc3c69d9b238c9f66
BLAKE2b-256 checksum
How to use checksums
3922b01ae41720c2c2f74e6e47dcd8192942c9fb68b9a80cf71d7ca5d93cb6cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 14, 2026.

Transparency log

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

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

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 Nov 14, 2026.

Transparency log

Security for flake8-kwargs-spaces 1.0.8

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.8.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 Nov 14, 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