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

Issue with is_iterable checker #45

Closed
aivrit opened this issue Nov 25, 2019 · 0 comments · Fixed by #48
Closed

Issue with is_iterable checker #45

aivrit opened this issue Nov 25, 2019 · 0 comments · Fixed by #48
Assignees
Labels
bug Something isn't working
Milestone

Comments

@aivrit
Copy link

aivrit commented Nov 25, 2019

Hi,using checkers.is_iterable returns True in cases where the object is not actually iterable.
the built-in checker only checks for an iter function, which exists for some classes (like the BaseQuery class of flask_sqlalchemy) even though it's not actually Iterable.
My suggestion is to add to the checkers.is_iterable function an assertion that also checks that the object is an instance of "Iterable" .
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants