You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def queue(data):
if data is None:
data = {"pageSize": 100}
for key, value in data.items():
if isinstance(value, list):
for val in value:
print(val)
Current behavior
scratches\scratch_14.py:6:23: E1133: Non-iterable value value is used in an iterating context (not-an-iterable)
Expected behavior
Not getting this message after any isinstance(name, list) check, regardless of the data shape before that check.
pylint --version output
pylint 2.1.1
astroid 2.0.4
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)]
There's some weird-ass stuff going on here. For example, replacing that key, value in data.items() with a value in data.values() stops this false positive. Of course, the original problem was quite a bit bigger, and I actually use that key. Removing the if self.data is None check+result will remove the warning.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Current behavior
scratches\scratch_14.py:6:23: E1133: Non-iterable value value is used in an iterating context (not-an-iterable)
Expected behavior
Not getting this message after any isinstance(name, list) check, regardless of the data shape before that check.
pylint --version output
pylint 2.1.1
astroid 2.0.4
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)]
There's some weird-ass stuff going on here. For example, replacing that
key, value in data.items()
with avalue in data.values()
stops this false positive. Of course, the original problem was quite a bit bigger, and I actually use that key. Removing theif self.data is None
check+result will remove the warning.The text was updated successfully, but these errors were encountered: