snowflakedb / snowflakedb/snowpark-python
SNOW-1306306: `DataFrame.cache_result()` type hinting
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 341
- Forks
- 155
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 27
Description
Please answer these questions before submitting your issue. Thanks!
-
What version of Python are you using?
Python 3.11.2
-
What operating system and processor architecture are you using?
macOS-14.2.1-arm64-arm-64bit
-
What are the component versions in the environment (
pip freeze)?
n/a
-
What did you do?
Cache result of a DataFrame and pylance type hinting in VScode shows type
Any -
What did you expect to see?
In this line using from snowflake.snowpark.table import Table will provide better typing hinting because of the absolute import
After the change:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/snowflake/snowpark/dataframe.py around line 165 and inspect the DataFrame.cache_result() type annotation and its Table import. Verify the import used there with Pylance in VS Code; done means the cached result is no longer reported as Any and receives the expected type hint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100