-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
documentation 📖Improvements or additions to documentationImprovements or additions to documentationreleasedIncluded in a releaseIncluded in a release
Description
Is your feature request related to a problem?
At the moment, changing the order of parameters is always a breaking change. Likewise, we can only add optional parameters at the end of the list.
Desired solution
In most cases (like for transformers & models), we should mark optional parameters as keyword only. Example:
def f(positional, *, keyword_only = 1)Now callers of the function must pass the parameter keyword_only by keyword only, i.e. f(1, keyword_only = 2) is allowed but f(1, 2) is not.
This rule should also be added to the guidelines.
Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
Related to #273.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentation 📖Improvements or additions to documentationImprovements or additions to documentationreleasedIncluded in a releaseIncluded in a release
Type
Projects
Status
✔️ Done