Skip to content

Issue 355 #376

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 6 commits into from
Jun 1, 2020
Merged

Issue 355 #376

merged 6 commits into from
Jun 1, 2020

Conversation

kszmigiel
Copy link
Member

@kszmigiel kszmigiel requested a review from sobolevn June 1, 2020 09:52
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

Let's also test that it works, because we already have a problematic use-case.
You will need to write something similar: https://github.com/typeddjango/django-stubs/blob/master/test-data/typecheck/test_request.yml

@@ -13,15 +13,15 @@ from django.template.context import Context

def render_to_response(
template_name: Union[str, Sequence[str]],
context: Optional[Union[Context, Dict[str, Any]]] = ...,
context: Optional[Union[Context, Mapping]] = ...,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mapping is generic. So, I guess it has to be Mapping[str, Any]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thing

@sobolevn sobolevn merged commit 8d26001 into typeddjango:master Jun 1, 2020
@sobolevn
Copy link
Member

sobolevn commented Jun 1, 2020

Thanks a lot!

@kszmigiel kszmigiel mentioned this pull request Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Using TypedDict for templates rendering
2 participants