Skip to content

api: use only kwargs #3108

@ghost

Description

Details from: #1818 (comment)

The last thing to address is using kwargs only on api.py module.

This is how it looks like:

>>> def hello(*, name='world'): print('hello', name)
>>> hello()
"hello world"
>>> hello("people")
TypeError: hello() takes 0 positional arguments but 1 was given

It makes the interface more explicit.
To make it work you only need to put an asterisk before the keyword arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhances DVCp3-nice-to-haveIt should be done this or next sprintrefactoringFactoring and re-factoring

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions