-
- Downloads
Type hints for tests.appservice (#14990)
* Accept a Sequence of events in synapse.appservice This avoids some casts/ignores in the tests I'm about to fixup. It seems that `List[Mock]` is not a subtype of `List[EventBase]`, but `Sequence[Mock]` is a subtype of `Sequence[EventBase]`. So presumably `Mock` is considered a subtype of anything, much like `Any`. * make tests.appservice.test_scheduler pass mypy * Extra hints in tests.appservice.test_scheduler * Extra hints in tests.appservice.test_api * Extra hints in tests.appservice.test_appservice * Disallow untyped defs * Changelog
Showing
- changelog.d/14990.misc 1 addition, 0 deletionschangelog.d/14990.misc
- mypy.ini 3 additions, 1 deletionmypy.ini
- synapse/appservice/__init__.py 2 additions, 2 deletionssynapse/appservice/__init__.py
- synapse/appservice/api.py 12 additions, 2 deletionssynapse/appservice/api.py
- synapse/appservice/scheduler.py 2 additions, 1 deletionsynapse/appservice/scheduler.py
- synapse/storage/databases/main/appservice.py 12 additions, 2 deletionssynapse/storage/databases/main/appservice.py
- tests/appservice/test_api.py 2 additions, 2 deletionstests/appservice/test_api.py
- tests/appservice/test_appservice.py 38 additions, 17 deletionstests/appservice/test_appservice.py
- tests/appservice/test_scheduler.py 60 additions, 32 deletionstests/appservice/test_scheduler.py
Loading
Please register or sign in to comment