False positive not-an-iterable
in match case
#5845
Labels
Duplicate 🐫
Duplicate of an already existing issue
False Positive 🦟
A message is emitted but nothing is wrong with the code
Match case
python 3.10
Bug description
I have 2 functions that do the same thing: recursively iterate an object and return all the string values. I would prefer to use iter2, with the match case, as it is easier on the eye. They both run correctly but pylint reports errors in the second function.
See original question on stackoverflow
Command used
Pylint output
pylint reports these errors in the function iter2.
Non-iterable value iter2(item) is used in an iterating context pylint (not-an-iterable)
Expected behavior
No error.
Pylint version
The text was updated successfully, but these errors were encountered: