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: [unknown-option-value] False negative after --disable=all #9491

Merged
merged 12 commits into from
Jul 29, 2024

Conversation

fellhorn
Copy link
Contributor

@fellhorn fellhorn commented Mar 9, 2024

Type of Changes

Type
βœ“ πŸ› Bug

Description

Closes #9403 by excluding a set of internal pylint messages from --disable=all.

As this is my first PR to pylint I appreciate any comment on the solution. Especially in regards of the message codes and having to change an existing test.

This comment has been minimized.

@jacobtylerwalls jacobtylerwalls changed the title Fix: [unknown-option-value] False negative after --disable=al Fix: [unknown-option-value] False negative after --disable=all Mar 9, 2024
tests/test_self.py Outdated Show resolved Hide resolved
@Pierre-Sassoulas Pierre-Sassoulas added Work in progress False Negative πŸ¦‹ No message is emitted but something is wrong with the code Waiting on author Indicate that maintainers are waiting for a message of the author and removed Work in progress labels Mar 18, 2024

This comment has been minimized.

@github-actions github-actions bot added the Needs take over πŸ›ŽοΈ Orignal implementer went away but the code could be salvaged. label May 14, 2024
@fellhorn
Copy link
Contributor Author

This PR needs take over because because it has been open 8 weeks with no activity.

I plan to take another look but lately had not really much capacity. If the issue is urgent though, please feel free to take over.

@Pierre-Sassoulas Pierre-Sassoulas removed the Needs take over πŸ›ŽοΈ Orignal implementer went away but the code could be salvaged. label May 14, 2024

This comment has been minimized.

Signed-off-by: Dennis Keck <[email protected]>
Copy link

codecov bot commented Jun 16, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 95.79%. Comparing base (6888fde) to head (6548d2c).
Report is 107 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #9491      +/-   ##
==========================================
- Coverage   95.82%   95.79%   -0.03%     
==========================================
  Files         174      174              
  Lines       18813    18925     +112     
==========================================
+ Hits        18027    18130     +103     
- Misses        786      795       +9     
Files Coverage Ξ”
pylint/lint/message_state_handler.py 96.53% <100.00%> (+0.05%) ⬆️
pylint/lint/run.py 87.59% <100.00%> (+0.09%) ⬆️

... and 31 files with indirect coverage changes

@fellhorn fellhorn marked this pull request as ready for review June 17, 2024 06:09
@@ -43,6 +43,19 @@
MSG_TYPES_LONG: dict[str, str] = {v: k for k, v in MSG_TYPES.items()}

MSG_TYPES_STATUS = {"I": 0, "C": 16, "R": 8, "W": 4, "E": 2, "F": 1}
PYLINT_MSGS = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we get this dynamically from the PyLinter class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @DanielNoord, I now understood the meaning of the MSGS constant after taking another look and got rid of this unnecessary additional constant.

Do you mind taking another look?

@jacobtylerwalls jacobtylerwalls removed the Waiting on author Indicate that maintainers are waiting for a message of the author label Jun 19, 2024
@jacobtylerwalls jacobtylerwalls added the Waiting on author Indicate that maintainers are waiting for a message of the author label Jul 8, 2024
@fellhorn fellhorn force-pushed the dennis/fix/all-messages branch 2 times, most recently from 01911de to 8449c81 Compare July 14, 2024 19:14
Signed-off-by: Dennis Keck <[email protected]>

This comment has been minimized.

@jacobtylerwalls jacobtylerwalls removed the Waiting on author Indicate that maintainers are waiting for a message of the author label Jul 14, 2024
@jacobtylerwalls jacobtylerwalls added this to the 3.3.0 milestone Jul 21, 2024
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.

Thanks, the implementation and test look great. One small nit and I think we can merge.

pylint/lint/run.py Outdated Show resolved Hide resolved
@jacobtylerwalls
Copy link
Member

You can pip install -r doc/requirements.txt and then towncrier create 9403.bugfix to create a changelog stub.

Copy link
Contributor

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

This comment was generated for commit 6548d2c

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.

Thanks for contributing this fix, and congrats on your first PR! Was a pleasure to collaborate.

@jacobtylerwalls jacobtylerwalls merged commit e64d453 into pylint-dev:main Jul 29, 2024
1 of 2 checks passed
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.

[unknown-option-value] False negative after --disable=all
4 participants