Conversation
added 12 commits
October 30, 2025 15:17
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds comprehensive type hints (PEP 484) to the td-client-python library, improving development experience with static type checkers. The changes include:
- Addition of type annotations to all public APIs and internal methods
- Creation of
tdclient/types.pymodule with type aliases and TypedDict classes - Addition of
py.typedmarker file for PEP 561 compliance - Configuration for pyright type checker and updates to pre-commit hooks
Reviewed Changes
Copilot reviewed 34 out of 38 changed files in this pull request and generated 64 comments.
Show a summary per file
| File | Description |
|---|---|
| tdclient/types.py | New module defining type aliases and TypedDict classes for common patterns |
| tdclient/py.typed | PEP 561 marker file for type stub support |
| tdclient/util.py | Added type hints to utility functions for CSV parsing and data processing |
| tdclient/client.py | Added comprehensive type hints to the main Client class |
| tdclient/api.py | Added type hints to HTTP API methods and request handling |
| tdclient/*_api.py | Added type hints to all API endpoint classes |
| tdclient/*_model.py | Added type hints to model classes |
| tdclient/cursor.py | Added type hints to cursor implementation |
| tdclient/connection.py | Added type hints to connection implementation |
| tdclient/errors.py | Added docstrings to exception classes |
| pyproject.toml | Added typing-extensions dependency and pyright configuration |
| .pre-commit-config.yaml | Updated hooks and added pyright check |
| .github/workflows/pythontest.yml | Added pyright execution to CI pipeline |
| README.rst | Added documentation about type hints feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.