Skip to content

Conversation

@jorwoods
Copy link
Contributor

@jorwoodsjorwoods 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.

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.
@jacalatajacalata merged commit 8b626db into tableau:developmentJun 19, 2024
@jorwoodsjorwoods deleted the jorwoods/queryset_typing branch June 20, 2024 00:45
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jorwoods@jacalata