Skip to content

Conversation

@kszmigiel
Copy link
Member

kszmigiel and others added 4 commits April 6, 2020 20:24
Revert "Allow template render to string helper functions to accept Co…
@kszmigiel kszmigiel requested a review from sobolevn June 2, 2020 23:24
class SupportsCount(Protocol):
def count(self) -> int: ...

class SupportsOrdered(Protocol):
Copy link
Member

Choose a reason for hiding this comment

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

Thanks a lot!

The only thing I see here is that we tend to use leading _ for our internal types.
Here's where this mistake comes from: https://github.com/typeddjango/django-stubs/blob/ef8850348b5862d39bfe529a39e71625c5d9c89d/django-stubs/core/paginator.pyi#L27

Can you please fix it in both places?

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!

@sobolevn sobolevn merged commit 197cb40 into typeddjango:master Jun 3, 2020
@sobolevn
Copy link
Member

sobolevn commented Jun 3, 2020

Thanks a lot!

@kszmigiel
Copy link
Member Author

No problem, trying to do my best 😁

sobolevn pushed a commit that referenced this pull request Jun 3, 2020
* proper redirect return type annotations made with Literal

* Mapping instead of Dict type annotation for context in render() with test

* removed Union and Context

* typo

Co-authored-by: Kacper Szmigiel <szmigielkacper@gmai.com>

Add __init__ to OrderedSet (#381)

Issue 382 (#384)

* WIP fix, pushed for testing

* added _ prefix for internal types

Co-authored-by: Kacper Szmigiel <szmigielkacper@gmai.com>

Fix parameter types for assertJSONEqual/NotEqual (#385)

Add get_supported_language_variant (#386)

Issue 309 (#383)

* added tags for user models

* type test for HttpRequest.user

* test for User and AnonymousUser tags

* httrequest test fix

* checking python version fix for readibility

* Rewrite version check for readability

* Annotate is_authenticated/is_anonymous with Literal-type

* Add auth in INSTALLED_APPS in test

* Fix wrong type assertion in test

* Fix misconception of how branch-testing works

* Remove user from WSGIRequest

* Change HttpRequest-transformer to set user-type to include AnonymousUser

* Add check for anonymous_user_info=None to appease mypy

* Isort transformers/request

* Remove trailing whitespace

* Remove unused import

Co-authored-by: Kacper Szmigiel <szmigielkacper@gmai.com>

* fix formatting and unused import

* reformatted again

Co-authored-by: Kacper Szmigiel <szmigielkacper@gmai.com>
@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.

Incorect type for items method of Sitemap class

2 participants