[Bug] Incorrect types in cosmos_db_trigger decorator

Open
#1,608 3 comments 0 reactions 1 assignee View on GitHub

@bhagyshricompany is already working on this.

Since Nov 18, 2024.

Assessment

This issue has not been assessed yet.

Description

area:python-functions bug docs python-sdk
Expected Behavior

When using the start_from_time and start_from_beginning parameters, no typing errors should occur.

Actual Behavior

These fields (start_from_time and start_from_beginning ) are both typed as Optional[time]. It seems to me like it should be:

start_from_beginning: Optional[bool] = None,
start_from_time: Optional[str] = None, <-- is this str or datetime? It is unclear to me

Also, the fields are not correctly documented in microsoft learn:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2-trigger?tabs=python-v2%2Cisolated-process%2Cextensionv4%2Cnodejs-v4&pivots=programming-language-python#example

Steps to Reproduce

Go to this link and you will see the incorrect types

Relevant code being tried

Relevant log output

requirements.txt file

Where are you facing this problem?

Local - Core Tools

Function app name

No response

Additional Information

No response

Dominant language
Python
Stars
357
Forks
116
Avg merge
32m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/azure-functions-python-worker

All issues in Azure/azure-functions-python-worker

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.