Type Annotation Issue in get_images Method inside llama_parse -> base.py #45

Open
opened 2026-02-16 00:16:42 -05:00 by yindo · 0 comments
Owner

Originally created by @arpitraval on GitHub (Mar 14, 2024).

Description:
I encountered an issue while using the get_images method in the provided codebase. It seems there's a type annotation error related to the list type subscript in the method signature. The error message indicates that subscripting for the list type will generate a runtime exception and suggests enclosing the type annotation in quotes.

Error Message:
error_message

Code Snippet (Affected Method):
affected_method

The issue arises with the list[dict] type annotation. To resolve this issue, the type annotation should be enclosed in quotes, like so:
issue_correction

This correction should prevent the runtime exception and ensure proper type hinting.

Environment:

Python version: [e.g., Python 3.8]

Originally created by @arpitraval on GitHub (Mar 14, 2024). Description: I encountered an issue while using the get_images method in the provided codebase. It seems there's a type annotation error related to the list type subscript in the method signature. The error message indicates that subscripting for the list type will generate a runtime exception and suggests enclosing the type annotation in quotes. Error Message: ![error_message](https://github.com/run-llama/llama_parse/assets/79243579/605d71e7-fd41-4193-9863-e5375fd2263e) Code Snippet (Affected Method): ![affected_method](https://github.com/run-llama/llama_parse/assets/79243579/41b9e210-fb26-4566-a4b6-2137a97a2b38) The issue arises with the list[dict] type annotation. To resolve this issue, the type annotation should be enclosed in quotes, like so: ![issue_correction](https://github.com/run-llama/llama_parse/assets/79243579/53e775a7-409f-442e-be30-7456cf863f5f) This correction should prevent the runtime exception and ensure proper type hinting. Environment: Python version: [e.g., Python 3.8]
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#45