Skip to content

Use inference to determine if **kwargs is missing a named parameter #8785

@jacobtylerwalls

Description

@jacobtylerwalls

I would expect these two lines to raise the same set of messages. We don't use inference to analyze whether **kwargs contains the missing named parameter x. We could.

import copy
import os

copy.copy(**{"y": os.environ})  # [unexpected-keyword-arg]
copy.copy(y=os.environ)  # [no-value-for-parameter, unexpected-keyword-arg]

False negative for no-value-for-parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    False Negative 🦋No message is emitted but something is wrong with the codeGood first issueFriendly and approachable by new contributorsHacktoberfestNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions