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

Incorrect return type for collection.get() or collection.stream() #51

Open
dibusan opened this issue Oct 24, 2021 · 0 comments
Open

Incorrect return type for collection.get() or collection.stream() #51

dibusan opened this issue Oct 24, 2021 · 0 comments

Comments

@dibusan
Copy link

dibusan commented Oct 24, 2021

From the line

arr = self.mock_db.collection('players').stream()

I expected a return type of Iterable[DocumentSnapshot] but instead got

  <generator object CollectionReference.stream at 0x106a1d890>

My setup code:

    def setUp(self) -> None:
            self.mock_db = MockFirestore()
            self.mock_db.collection('players').add({
                'name': 'John Doe',
                'id': 'johndoe',
            })
            self.mock_db.collection('players').add({
               'name': 'Jane Doe',
               'id': 'johndoe',
            })

Screenshot of Pycharm's documentation

Screen Shot 2021-10-24 at 10 41 44 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant