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

Respect docstring-min-length in docparams extension #10104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

berkersal
Copy link

Even though visit_functiondef is checking for docstring-min-length, it is not enough. This commit fixes the issue by adding the same check to visit_raise, visit_return and visit_yield

If there is a better way of implementing this, please go forward. I am just providing a working fix to this problem.

Type of Changes

Type
🐛 Bug fix

Description

Refs #XXXX

Closes #XXXX

Even though visit_functiondef is checking for docstring-min-length, it is not enough. This commit fixes the issue by adding the same check to visit_raise, visit_return and visit_yield
@Pierre-Sassoulas Pierre-Sassoulas added the False Negative 🦋 No message is emitted but something is wrong with the code label Dec 2, 2024
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 95.79%. Comparing base (55098c7) to head (acc2d6d).

Files with missing lines Patch % Lines
pylint/extensions/docparams.py 75.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #10104      +/-   ##
==========================================
- Coverage   95.80%   95.79%   -0.02%     
==========================================
  Files         174      174              
  Lines       18973    18985      +12     
==========================================
+ Hits        18177    18186       +9     
- Misses        796      799       +3     
Files with missing lines Coverage Δ
pylint/extensions/docparams.py 98.52% <75.00%> (-1.48%) ⬇️

Copy link
Contributor

github-actions bot commented Dec 2, 2024

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉

This comment was generated for commit acc2d6d

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Thank you for opening a PR ! Would you mind adding functional tests (https://github.com/pylint-dev/pylint/tree/main/tests/functional/ext/docparams) and a changelog (https://github.com/pylint-dev/pylint/tree/main/doc/whatsnew/fragments) for this please ?

@jacobtylerwalls jacobtylerwalls added this to the 4.0.0 milestone Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Negative 🦋 No message is emitted but something is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants