Skip to content

Allow positional include args for FilterTransforms in AdapterΒ #249

@LarsKue

Description

@LarsKue

The following call will raise a confusing error:

a = bf.Adapter()
a.standardize("x")
>>> TypeError: Adapter.standardize() takes 1 positional argument but 2 were given

However, the intent is very clear: we only want to standardize x. The current way to do this is via an include list which is given as an explicit keyword argument:

a.standardize(include="x")

However, this seems a little bit ugly. We could allow users to pass this as a positional argument as well. So long as none of the keyword-only arguments are defined, we default to turning the positional argument into the include list.

Metadata

Metadata

Assignees

Labels

featureNew feature or requestgood first issueGood for first-time contributorsrefactoringSome code shall be redesigned

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions