OpenMined / trasterisk

kwarger is a Flake8 plugin which enforces named kwargs or trasterisks in your function arguments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flake8-kwarger

kwarger is a Flake8 plugin which enforces named kwargs or trasterisks in your function arguments.

$ pip install git+https://github.com/madhavajay/flake8-kwarger#egg=flake8-kwarger

Rules

FKO100 Non Keyword-Only Arguments not allowed. Try adding a '*'.
class A:
    @staticmethod
    def foo_bad(forcenamed):
        print(forcenamed)

    def foo_good(*, forcenamed):
        print(forcenamed)

    def bar_bad(self, forcenamed):
        print(self, forcenamed)

    def bar_good(self, *, forcenamed):
        print(self, forcenamed)

    def bar_bad_ignore(_self):  # noqa: FKO100
        print(_self)

About

kwarger is a Flake8 plugin which enforces named kwargs or trasterisks in your function arguments

License:MIT License


Languages

Language:Python 100.0%