-
Notifications
You must be signed in to change notification settings - Fork 33
Fix #265 by passing options to FirebaseAlertOptions #266
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -672,6 +672,7 @@ def _endpoint( | |||||||||||
| return FirebaseAlertOptions( | ||||||||||||
| alert_type=kwargs["alert_type"], | ||||||||||||
| app_id=self.app_id, | ||||||||||||
| **self._asdict_with_global_options() | ||||||||||||
| )._endpoint(**kwargs) | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
|
|
@@ -695,6 +696,7 @@ def _endpoint( | |||||||||||
| return FirebaseAlertOptions( | ||||||||||||
| alert_type=kwargs["alert_type"], | ||||||||||||
| app_id=self.app_id, | ||||||||||||
| **self._asdict_with_global_options() | ||||||||||||
|
Comment on lines
697
to
+699
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Since
Suggested change
|
||||||||||||
| )._endpoint(**kwargs) | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
|
|
@@ -718,6 +720,7 @@ def _endpoint( | |||||||||||
| return FirebaseAlertOptions( | ||||||||||||
| alert_type=kwargs["alert_type"], | ||||||||||||
| app_id=self.app_id, | ||||||||||||
| **self._asdict_with_global_options() | ||||||||||||
|
Comment on lines
721
to
+723
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Since
Suggested change
|
||||||||||||
| )._endpoint(**kwargs) | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
|
|
@@ -735,6 +738,7 @@ def _endpoint( | |||||||||||
| assert kwargs["alert_type"] is not None | ||||||||||||
| return FirebaseAlertOptions( | ||||||||||||
| alert_type=kwargs["alert_type"], | ||||||||||||
| **self._asdict_with_global_options() | ||||||||||||
| )._endpoint(**kwargs) | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
app_idis passed as an explicit keyword argument, but it will also be present in the dictionary returned byself._asdict_with_global_options()becauseAppDistributionOptionshas anapp_idfield. This will result in aTypeErrorfor passingapp_idtwice whenself.app_idis notNone.Since
_asdict_with_global_options()already includesapp_idfromself, you can remove the explicitapp_id=self.app_idargument.