diff options
author | David Robertson <davidr@element.io> | 2023-02-06 12:49:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-06 12:49:06 +0000 |
commit | e8269ed391a199bbe0e43efc28c68c98b949b323 (patch) | |
tree | 5b9d84f643925b7a92c2e89e7a7db3850714f8fe /mypy.ini | |
parent | Bump anyhow from 1.0.68 to 1.0.69 (#14996) (diff) | |
download | synapse-e8269ed391a199bbe0e43efc28c68c98b949b323.tar.xz |
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
Diffstat (limited to '')
-rw-r--r-- | mypy.ini | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mypy.ini b/mypy.ini index a6e37bc377..351b8ccade 100644 --- a/mypy.ini +++ b/mypy.ini @@ -32,7 +32,6 @@ exclude = (?x) |synapse/storage/databases/main/cache.py |synapse/storage/schema/ - |tests/appservice/test_scheduler.py |tests/federation/test_federation_catch_up.py |tests/federation/test_federation_sender.py |tests/http/federation/test_matrix_federation_agent.py @@ -78,6 +77,9 @@ disallow_untyped_defs = True [mypy-tests.app.*] disallow_untyped_defs = True +[mypy-tests.appservice.*] +disallow_untyped_defs = True + [mypy-tests.config.*] disallow_untyped_defs = True |