Fix nested-min-max output msg#8234
Conversation
e24659c to
9393480
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8234 +/- ##
=======================================
Coverage 95.45% 95.45%
=======================================
Files 177 177
Lines 18646 18654 +8
=======================================
+ Hits 17798 17806 +8
Misses 848 848
|
Pierre-Sassoulas
left a comment
There was a problem hiding this comment.
Looks amazing already !
| [module, "-E"], expected_output="", unexpected_output=unexpected | ||
| ) | ||
|
|
||
| def test_nested_min_max_splats(self) -> None: |
There was a problem hiding this comment.
I think we can remove this if we also have functional tests(I like functional tests a lot)
There was a problem hiding this comment.
You'd think, but functional tests aren't testing the output message language exactly, so I felt better adding this to ensure "*" is in the message
There was a problem hiding this comment.
If I understand correctly there is an issue with * in functional tests ?
There was a problem hiding this comment.
No no, no issue. You can see the functional test .txt file looks great.
What I mean is that as far as I understand, the functional test will ensure that the message
nested-min-max appears in a specific line, indicated by adding # [nested-min-max] to that line
but what I want to test is not just that the msg is emitted, but that the msg suggestion specifically says "it's possible to do 'max(3, *nums, *lst2)' i". I can only assert this in the unit test, not the functional test.
There was a problem hiding this comment.
https://github.com/PyCQA/pylint/pull/8234/files#r1100266806 (Modify the expected output in this file and the tests should fail provided you have python 3.8 ore more recent)
| {"_sitebuiltins.Quitter", "sys.exit", "posix._exit", "nt._exit"} | ||
| ) | ||
|
|
||
| DICT_TYPES = ( |
There was a problem hiding this comment.
Let's keep this in the variable checkers, we don't want to have checkers be coupled because of this constant and the module name 'utils' is horrible.
There was a problem hiding this comment.
fair point! the repo uses "utils" a ton. So just have both "DICT_TYPES" in each module regardless of duplication?
This comment has been minimized.
This comment has been minimized.
|
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit a30dd4b |
(cherry picked from commit 29684fe)
(cherry picked from commit 29684fe) Co-authored-by: Dani Alcala <112832187+clavedeluna@users.noreply.github.com>
Type of Changes
Description
Fix
nested-min-maxsuggestion message to indicate it's possible to splat iterable objects.Closes #8168