Skip to content
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

Feature: add type support for response json #158

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Conversation

yanyongyu
Copy link
Owner

Now, you can inspect the type and fields in response.json()

from typing_extensions import reveal_type

from githubkit import GitHub, Response

g = GitHub()

resp = g.rest.repos.get("owner", "repo")

reveal_type(resp.parsed_data)  # FullRepository
reveal_type(resp.json())  # FullRepositoryType

@yanyongyu yanyongyu added the enhancement New feature or request label Nov 4, 2024
@yanyongyu yanyongyu merged commit dd226ac into master Nov 4, 2024
34 checks passed
@yanyongyu yanyongyu deleted the feat/json-types branch November 4, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant