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

Use list for relationship(uselist=True) instead of iterable #82

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion sqlmypy.py
Expand Up @@ -372,7 +372,7 @@ class User(Base):
# We figured out, the model type. Now check if we need to wrap it in Iterable
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment should be updated to say list

if uselist_arg:
if parse_bool(uselist_arg):
new_arg = ctx.api.named_generic_type('typing.Iterable', [new_arg])
new_arg = ctx.api.named_generic_type('builtins.list', [new_arg])
else:
if has_annotation:
# If there is an annotation we use it as a source of truth.
Expand Down