wjddn279 commented on code in PR #64524:
URL: https://github.com/apache/airflow/pull/64524#discussion_r3014122858
##########
providers/pinecone/tests/system/pinecone/example_dag_pinecone.py:
##########
@@ -37,7 +37,7 @@
task_id="pinecone_vector_ingest",
index_name=index_name,
input_vectors=[
- ("id1", [1.0, 2.0, 3.0], {"key": "value"}),
Review Comment:
Since the types are mixed in this:
```
Argument "input_vectors" to "PineconeIngestOperator" has incompatible type
"list[tuple[str | list[float] | dict[str, str], ...]]"; expected
"list[Vector] | list[tuple[str, list[float]]] | list[tuple[str,
list[float], dict[str, str | int | float | list[str] | list[int] |
list[float]]]] | list[VectorTypedDict]"
input_vectors=[
("id1", [1.0, 2.0, 3.0], {"key": "value"}),
("id2", [1.0, 2.0, 3.0]),
],
```
mypy infers it as a variable-length tuple and fails.
We would need to either unify the types like this:
```
input_vectors=[
("id1", [1.0, 2.0, 3.0], {"key": "value"}),
("id2", [1.0, 2.0, 3.0], {"key2": "value"}),
],
```
or add a type ignore.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]