Skip to content

Typing for optional function parameters are incorrect #854

@dcgudeman

Description

@dcgudeman

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)

Metadata

Metadata

Assignees

Labels

api: firestoreIssues related to the googleapis/python-firestore API.priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions