django-stubs
django-stubs copied to clipboard
Improve typing in template registry
Fixes #1903
I'm fine with adding the tests, since e.g. the decorators aren't trivial. But I'd say we should bundle them under the same test, some "decorator test".
Mainly as the suite gets slowed down quite a bit with multiple tests.
Will do. I'll also try to add some comments in the stubs, so that it's easier to reason about which overload matches to which use case
Assigned to @flaeppe. If you don't want to lead the review here, feel free to unassign yourself.
I'm fine with adding the tests, since e.g. the decorators aren't trivial. But I'd say we should bundle them under the same test, some "decorator test".
Mainly as the suite gets slowed down quite a bit with multiple tests.
Thinking again about this, maybe this would things a bit confusing? We would end up with tests of the same module in a separate location.
But if still think we should do it this way, I can work on another PR moving every decorator tests, once this one gets merged (will makes things easier to review)
Thinking again about this, maybe this would things a bit confusing? We would end up with tests of the same module in a separate location.
I meant gathering the newly added tests in this PR under the same test case. e.g. test_library_decorators. That shouldn't result in multiple locations.
But if still think we should do it this way, I can work on another PR moving every decorator tests, once this one gets merged (will makes things easier to review)
If you like to refactor existing tests in a separate PR later on, that's fine too