feat: consolidate and export public type aliases (HyperAction, FilePath, AddResponse, IDP types) - #1825
feat: consolidate and export public type aliases (HyperAction, FilePath, AddResponse, IDP types)#1825jacalata wants to merge 2 commits into
Conversation
|
Claude Code posted this on my behalf after review: OverviewThe PR title/description says this consolidates five families of previously-duplicated type aliases (
This looks like squashed/rebased history from other branches (commit messages like "Create Sphinx configuration file for documentation," "add more e2e tests," "change theme" appear in What's good about the core type-consolidation change
Issues found
SecurityNothing security-sensitive in the type-consolidation change itself. The new RecommendationThe type-consolidation refactor itself is sound (verified by tests/mypy/black) and worth merging, but I'd ask the author to confirm the diff scope before approval — specifically, whether this branch should be rebased to drop the docs/e2e/docstring commits so this PR reviews cleanly as "consolidate and export public type aliases," matching its title and description. |
|
@jacalata see the things claude code pointed out above -- in particular are we sure the "docs" changes should be in here? (Docs are still in gh-pages branch.) |
…ient.types HyperAction*, FilePath, FileObject*, PathOrFile*, AddResponse, IDPAttributes, IDPProperty, and HasIdpConfigurationID were defined locally in endpoint files (in some cases duplicated across 4 files) but not importable from the top-level package. Users annotating calls to update_hyper_data(), publish(), download(), add_to_schedule(), or OIDC methods had to import from internal modules. Move all shared type aliases to tableauserverclient/types.py and re-export from tableauserverclient/__init__.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
73d225c to
e418c61
Compare
|
cleaned up, docs work now lives in #1832. |
Summary
HyperAction,HyperActionTable,HyperActionRow,HyperActionCondition— needed to annotate theactionsargument todatasources.update_hyper_data()FilePath,FileObject,FileObjectR,FileObjectW,PathOrFile,PathOrFileR,PathOrFileW— needed to annotatepublish()/download()arguments across datasources, workbooks, flows, and custom views; were duplicated across 4 endpoint filesAddResponse— return type ofschedules.add_to_schedule(), also used by the same method on datasources, workbooks, and flowsIDPAttributes,IDPProperty,HasIdpConfigurationID— needed to annotate arguments tooidc.get_by_id()andoidc.delete_configuration()All types are now defined in
tableauserverclient/types.pyand exported fromtableauserverclient/__init__.py. The endpoint files import fromtypes.pyinstead of defining them locally.Test plan
pytest test/)from tableauserverclient import HyperAction, FilePath, AddResponse, HasIdpConfigurationID🤖 Generated with Claude Code