Skip to content

Star-arg unpacking after a keyword argument is strongly discouraged #355

Description

@DimitriPapadopoulos

instance = nipype_factory(arg0, base_class=cls, *nargs, **nkwargs)

super().__init__(
definition=definition,
activate_copy=True,
inputs_to_copy=inputs_to_copy,
inputs_to_symlink=inputs_to_symlink,
inputs_to_clean=inputs_to_clean,
use_temp_output_dir=use_temp_output_dir,
*args,
**kwargs,
)

super().__init__(
definition=definition,
activate_copy=False,
use_temp_output_dir=use_temp_output_dir,
*args,
**kwargs,
)

See flake8-bugbear B026 star-arg-unpacking-after-keyword-arg:

Why is this bad?

In Python, you can use star-argument unpacking to pass a list or tuple of arguments to a function.

Providing a star-argument after a keyword argument can lead to confusing behavior, and is only supported for backwards compatibility.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions