Skip to content

Commit

Permalink
Fix types for assertNumQueries and assertQuerySetEqual (#1823)
Browse files Browse the repository at this point in the history
  • Loading branch information
flaeppe authored Nov 7, 2023
1 parent 73dafc6 commit c7d6adc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions django-stubs/test/testcases.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ class TransactionTestCase(SimpleTestCase):
self,
qs: Iterator[Any] | list[Model] | QuerySet | RawQuerySet,
values: Collection[Any],
transform: Callable[[Model], Any] | type[str] = ...,
transform: Callable[[Model], Any] | type[str] | None = ...,
ordered: bool = ...,
msg: str | None = ...,
) -> None: ...
@overload
def assertNumQueries(self, num: int, using: str = ...) -> _AssertNumQueriesContext: ... # type: ignore[misc]
def assertNumQueries(self, num: int, func: None = ..., *, using: str = ...) -> _AssertNumQueriesContext: ...
@overload
def assertNumQueries(
self, num: int, func: Callable[..., Any], *args: Any, using: str = ..., **kwargs: Any
Expand Down
4 changes: 0 additions & 4 deletions scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1953,8 +1953,6 @@ django.templatetags.tz.timezone_constructor
django.test.SimpleTestCase.assertFormError
django.test.SimpleTestCase.assertFormSetError
django.test.SimpleTestCase.assertTemplateNotUsed
django.test.TransactionTestCase.assertNumQueries
django.test.TransactionTestCase.assertQuerySetEqual
django.test.runner.DiscoverRunner.build_suite
django.test.runner.DiscoverRunner.log
django.test.runner.DiscoverRunner.reorder_by
Expand Down Expand Up @@ -1997,8 +1995,6 @@ django.test.testcases.SerializeMixin.tearDownClass
django.test.testcases.SimpleTestCase.assertFormError
django.test.testcases.SimpleTestCase.assertFormSetError
django.test.testcases.SimpleTestCase.assertTemplateNotUsed
django.test.testcases.TransactionTestCase.assertNumQueries
django.test.testcases.TransactionTestCase.assertQuerySetEqual
django.test.testcases._AssertTemplateUsedContext.__init__
django.test.testcases._AssertTemplateUsedContext.message
django.test.utils.TimeKeeperProtocol
Expand Down

0 comments on commit c7d6adc

Please sign in to comment.