Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false negative for no-value-for-parameter #8575

Merged
merged 1 commit into from
Apr 15, 2023
Merged

Fix false negative for no-value-for-parameter #8575

merged 1 commit into from
Apr 15, 2023

Conversation

mbyrnepr2
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

Fix false negative for no-value-for-parameter when a function, whose signature contains both a positional-only parameter name and also *kwargs, is called with a keyword-argument for name.

# pylint: disable=missing-function-docstring, missing-module-docstring
def required_positional_with_var_kwargs(a, /, **_kwargs):
    return a

required_positional_with_var_kwargs(a=43)

Closes #8559

@mbyrnepr2 mbyrnepr2 changed the title Fix false negative for no-value-for-parameter when a function, wh… Fix false negative for no-value-for-parameter Apr 13, 2023
@mbyrnepr2 mbyrnepr2 changed the title Fix false negative for no-value-for-parameter Fix false negative for no-value-for-parameter Apr 13, 2023
@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Merging #8575 (6af34e4) into main (56fa5dc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8575    /-   ##
=======================================
  Coverage   95.91%   95.91%           
=======================================
  Files         174      174           
  Lines       18371    18373     2     
=======================================
  Hits        17620    17622     2     
  Misses        751      751           
Impacted Files Coverage Ξ”
pylint/checkers/typecheck.py 96.46% <100.00%> ( <0.01%) ⬆️

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 5436976

…ose signature contains both a positional-only parameter ``name`` and also ``*kwargs``, is called with a keyword-argument for ``name``.

Closes #8559
@github-actions
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 6af34e4

@mbyrnepr2 mbyrnepr2 marked this pull request as ready for review April 13, 2023 19:22
Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Terrific!

@@ -0,0 1 @@
no-value-for-parameter:11:0:11:16::No value for argument 'param1' in function call:UNDEFINED
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a follow-up we could add the confidence.

@jacobtylerwalls jacobtylerwalls modified the milestones: 3.0.0, 3.0.0b1 Apr 15, 2023
@jacobtylerwalls jacobtylerwalls merged commit 2db55f6 into pylint-dev:main Apr 15, 2023
@Pierre-Sassoulas Pierre-Sassoulas deleted the 8559_false_negative_no-value-for-parameter branch April 15, 2023 07:51
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 3.0.0b1, 3.0.0a7 May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False negative no-value-for-parameter when positional-only argument name consumed by **kwargs
3 participants