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

Improve type annotation of DiscoverRunner. #1069

Merged
merged 1 commit into from
Jul 22, 2022
Merged

Conversation

PIG208
Copy link
Contributor

@PIG208 PIG208 commented Jul 22, 2022

I have made things!

The return type of DiscoverRunner.get_resultclass should
be Optional[Type[TextTestResult]] given that it may also return PDBDebugResult:
https://github.com/django/django/blob/0dd29209091280ccf34e07c9468746c396b7778e/django/test/runner.py#L958-L962

DicoverRunner.run_tests accepts None for extra_tests because
that's already the default value for it:
https://github.com/django/django/blob/0dd29209091280ccf34e07c9468746c396b7778e/django/test/runner.py#L1030

The return type of DiscoverRunner.get_resultclass should
be Optional[Type[TextTestResult]] given that it may also return PDBDebugResult:
https://github.com/django/django/blob/0dd29209091280ccf34e07c9468746c396b7778e/django/test/runner.py#L958-L962

`DicoverRunner.run_tests` accepts `None` for `extra_tests` because
that's already the default value for it:
https://github.com/django/django/blob/0dd29209091280ccf34e07c9468746c396b7778e/django/test/runner.py#L1030
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!

@sobolevn sobolevn merged commit 563e947 into typeddjango:master Jul 22, 2022
@PIG208 PIG208 deleted the test branch July 22, 2022 14:15
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.

2 participants