Improve type hints for cached decorator. (#15658)
The cached decorators always return a Deferred, which was not properly propagated. It was close enough when wrapping coroutines, but failed if a bare function was wrapped.
Showing
- changelog.d/15658.misc 1 addition, 0 deletionschangelog.d/15658.misc
- scripts-dev/mypy_synapse_plugin.py 33 additions, 1 deletionscripts-dev/mypy_synapse_plugin.py
- synapse/storage/databases/main/roommember.py 1 addition, 1 deletionsynapse/storage/databases/main/roommember.py
- synapse/util/caches/descriptors.py 4 additions, 2 deletionssynapse/util/caches/descriptors.py
- tests/appservice/test_appservice.py 29 additions, 53 deletionstests/appservice/test_appservice.py
- tests/storage/test_transactions.py 5 additions, 6 deletionstests/storage/test_transactions.py
Loading
Please register or sign in to comment