Azure / Azure/azure-functions-python-worker

[Bug] Incorrect types in cosmos_db_trigger decorator

Đang mở
#1,608 3 bình luận 0 reaction 1 người được giao Được @bhagyshricompany nhận Xem trên GitHub
area:python-functions bug docs python-sdk
Ngôn ngữ chính
Python
Star
357
Fork
116
Merge trung bình
32 phút
Pull request đã merge (30 ngày)
1

Mô tả

### 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](https://github.com/Azure/azure-functions-python-library/blob/48a5758f636abbe3f1b0634881b7eefbb74c3cf3/azure/functions/decorators/function_app.py#L1034-L1035) and you will see the incorrect types

### Relevant code being tried

```shell

```

### Relevant log output

```shell

```

### requirements.txt file

```shell

```

### Where are you facing this problem?

Local - Core Tools

### Function app name

_No response_

### Additional Information

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.