Skip to content

SNOW-3538315: add type annotations to DataFrame telemetry decorators#4230

Open
gitovska wants to merge 1 commit into
snowflakedb:mainfrom
gitovska:SNOW-3538315
Open

SNOW-3538315: add type annotations to DataFrame telemetry decorators#4230
gitovska wants to merge 1 commit into
snowflakedb:mainfrom
gitovska:SNOW-3538315

Conversation

@gitovska
Copy link
Copy Markdown

  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-3538315

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
    • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support. Follow the link for more information: AST Support Guidelines
  3. Please describe how your code solves the related issue.

Three telemetry decorators (df_api_usage, df_to_relational_group_df_api_usage, relational_group_df_api_usage) had no type annotations, causing all wrapped DataFrame and RelationalGroupedDataFrame methods to return Unknown under strict type checkers (pyright, ty).

Added _FuncT = TypeVar("_FuncT", bound=Callable[..., Any]) and annotated all three decorators as (func: _FuncT) -> _FuncT, following the pattern used in the existing publicapi decorator in utils.py

Type annotation only. No behavioural change.

@gitovska gitovska requested review from a team as code owners May 19, 2026 17:50
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@gitovska
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant