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

Loosen type requirement for insert_many()? #591

Closed
mikeckennedy opened this issue Jun 9, 2023 · 6 comments
Closed

Loosen type requirement for insert_many()? #591

mikeckennedy opened this issue Jun 9, 2023 · 6 comments
Labels

Comments

@mikeckennedy
Copy link

mikeckennedy commented Jun 9, 2023

Hey. This is low priority, however, could be worth doing.

On Document.insert_many the parameter documents is of type list[Document]. Would it be reasonable to make that any iterable of document rather than strictly list? For example, would a tuple or set of documents work?

There are probably other, related methods with the same situation taking a list of documents. For example, on beanie_init the models list there is also a list rather than iterable.

@roman-right roman-right added the bug Something isn't working label Jun 9, 2023
@roman-right
Copy link
Member

Hi @mikeckennedy ,
You are right. I have to make an inspection and replace lists with iterable type

@mikeckennedy
Copy link
Author

Thanks Roman. I appreciate that. It's no big deal but something that come up as I'm working on the new course. :)

@roman-right
Copy link
Member

Types mistakes in libraries can annoy more than runtime bugs, as IDEs highlight them prominently :D Thank you for the catch!

@roman-right
Copy link
Member

It will be fixed in #669

@roman-right roman-right removed the bug Something isn't working label Aug 21, 2023
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the Stale label Sep 21, 2023
@github-actions
Copy link

github-actions bot commented Oct 5, 2023

This issue was closed because it has been stalled for 14 days with no activity.

@github-actions github-actions bot closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants