The Wayback Machine - https://web.archive.org/web/20200917132055/https://github.com/gaul/flake8-kw-only-args
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

flake8-kw-only-args

A flake8 plugin that checks for default arguments like:

def default(key=value):
    ...

Positional paramters can unintentionally override these arguments. Instead use the safer kw-only argument equivalent:

def kw_only(*, key=value):
    ...

Install

Install with pip:

$ pip install flake8-kw-only-args

You can check that flake8 has picked it up by looking for flake8-kw-only-args in the output of --version:

$ flake8 --version
2.6.2 (pycodestyle: 2.0.0, flake8-kw-only-args: 1.0.0, pyflakes: 1.2.3, mccabe: 0.5.0) CPython 2.7.11+ on Linux

Warnings

This plugin add new flake8 warning:

  • K801: non-kw-only argument

Requirements

  • Python 3.x (tested on 3.5, 3.6, and 3.7)
  • flake8 or pycodestyle

References

Licence

BSD license

About

Flake8 plugin that checks for default arguments that positional parameters can unintentionally override

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.