pylint-dev/pylint

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

Open

#8,785 opened on Jun 18, 2023

View on GitHub
聽(4 comments)聽(0 reactions)聽(0 assignees)Python聽(4,978 stars)聽(1,059 forks)batch import
False Negative 馃Good first issueHacktoberfestNeeds PR

Description

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.

Contributor guide

Use inference to determine if **kwargs is missing a named parameter 路 pylint-dev/pylint#8785 | Good First Issue