FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

handle more iterable types for messaging tokens by pawel-steto · Pull Request #977 · firebase/firebase-admin-python · GitHub

handle more iterable types for messaging tokens - #977

Open
pawel-steto wants to merge 1 commit into
firebase:mainfrom
pawel-steto:pawe/allow-iterable-tokens
Open

handle more iterable types for messaging tokens#977
pawel-steto wants to merge 1 commit into
firebase:mainfrom
pawel-steto:pawe/allow-iterable-tokens

Conversation

Copy link
Copy Markdown

The messaging tokens could only be a python list

This PR allows to pass tuples, sets, or event django querysets.

google-cla Bot commented Aug 21, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Code Review

This pull request relaxes type checks in check_string_list and check_number_list from list to Iterable (excluding str and dict) to support other iterable types like tuples and sets, with corresponding test updates. The reviewer noted that using Iterable allows generators or iterators, which can be exhausted during validation and will raise a TypeError when len() is called. The reviewer suggested using Collection instead of Iterable to ensure the input is sized and can be safely iterated multiple times.

Comment thread firebase_admin/_messaging_encoder.py Outdated
Comment thread firebase_admin/_messaging_encoder.py Outdated
Comment thread firebase_admin/_messaging_encoder.py Outdated
pawel-steto force-pushed the pawe/allow-iterable-tokens branch from b65857f to 410ccb1 Compare August 21, 2026 09:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL