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

Typing for optional function parameters are incorrect #854

Open
dcgudeman opened this issue Feb 21, 2024 · 0 comments · May be fixed by #855
Open

Typing for optional function parameters are incorrect #854

dcgudeman opened this issue Feb 21, 2024 · 0 comments · May be fixed by #855
Assignees
Labels
api: firestore Issues related to the googleapis/python-firestore API.
Milestone

Comments

@dcgudeman
Copy link

dcgudeman commented Feb 21, 2024

Environment details

  • OS type and version: MacOS
  • Python version: 3.11
  • pip version: 23.3.1
  • google-cloud-firestore version: 2.14.0

Steps to reproduce

  1. Use a function that has an optional parameter
  2. Observe type error

Code example

async_client = AsyncClient()
async_col_ref = async_client.collection("users")
all_users = async_col_ref.stream()

Stack trace

Argument of type "None" cannot be assigned to parameter "transaction" of type "Transaction" in function "stream"
  "None" is incompatible with "Transaction"Pylance[reportArgumentType](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportArgumentType)
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/python-firestore API. label Feb 21, 2024
@daniel-sanche daniel-sanche added this to the Q2 milestone Feb 23, 2024
@daniel-sanche daniel-sanche self-assigned this Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/python-firestore API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants