10000 chore: type hint QuerySet and QuerySetEndpoint by jorwoods · Pull Request #1399 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

chore: type hint QuerySet and QuerySetEndpoint #1399< 8000 /span>

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 19, 2024

Conversation

jorwoods
Copy link
Contributor
@jorwoods jorwoods commented Jun 17, 2024

This PR makes heavier use of the generics and TypeVars like what is defined in PEP 484, so that usage of .all and .filter preserve type information of objects coming from the subclass's endpoints.

This also adds a with_page_size method onto the QuerySet object so that users can set the page request size in the same builder pattern chain.

jorwoods added 7 commits June 16, 2024 22:24
There are many methods on QuerySet that implicitly call
fetch_all. This moves emptying the result cache to immediately
before the explicit call to fetch_call after the page number has
been updated. This ensures that the correct latest page is fetched.
@jacalata jacalata merged commit 8b626db into tableau:development Jun 19, 2024
21 checks passed
@jorwoods jorwoods deleted the jorwoods/queryset_typing branch June 20, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0