Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

chore: type hint QuerySet and QuerySetEndpoint#1399

Merged
jacalata merged 8 commits intotableau:developmenttableau/server-client-python:developmentfrom
jorwoods:jorwoods/queryset_typingjorwoods/server-client-python:jorwoods/queryset_typingCopy head branch name to clipboard
Jun 19, 2024
Merged

chore: type hint QuerySet and QuerySetEndpoint#1399
jacalata merged 8 commits intotableau:developmenttableau/server-client-python:developmentfrom
jorwoods:jorwoods/queryset_typingjorwoods/server-client-python:jorwoods/queryset_typingCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.