tableau / server-client-python

A Python library for the Tableau Server REST API
https://tableau.github.io/server-client-python/
MIT License
648 stars 416 forks source link

chore: add typing to Pager #1390

Closed jorwoods closed 4 weeks ago

jorwoods commented 1 month ago

Add typing to the Pager object. The typing addition makes it clearer for language servers to detect what type of objects are yielded from the iterable, making TSC easier to use.

Additionally, this simplifies the way items are returned from the intermediate list object. Different from before, if the server count changes while the Pager is working, this change will continue to function. If desired, it can be reset to exiting gracefully should the server count change.