summary refs log tree commit diff
path: root/synapse/streams
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-11-14 13:46:29 +0000
committerGitHub <noreply@github.com>2022-11-14 13:46:29 +0000
commit2cc592584ae9f225216b7663e9144ac6f565b757 (patch)
tree24803060a64b17e1b21b0a74082c5bc9e33143bb /synapse/streams
parentClean-up events persistance code (#14411) (diff)
downloadsynapse-2cc592584ae9f225216b7663e9144ac6f565b757.tar.xz
Remove unused type-ignores (#14433)
* Remove unused type-ignores

Oversights in #14427 and #14429.

* Changelog
Diffstat (limited to 'synapse/streams')
-rw-r--r--synapse/streams/events.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/streams/events.py b/synapse/streams/events.py
index bcd840bd88..f331e1af16 100644
--- a/synapse/streams/events.py
+++ b/synapse/streams/events.py
@@ -45,9 +45,12 @@ class _EventSourcesInner:
 class EventSources:
     def __init__(self, hs: "HomeServer"):
         self.sources = _EventSourcesInner(
-            # mypy thinks attribute.type is `Optional`, but we know it's never `None` here since
-            # all the attributes of `_EventSourcesInner` are annotated.
-            *(attribute.type(hs) for attribute in attr.fields(_EventSourcesInner))  # type: ignore[misc]
+            # mypy previously warned that attribute.type is `Optional`, but we know it's
+            # never `None` here since all the attributes of `_EventSourcesInner` are
+            # annotated.
+            # As of the stubs in attrs 22.1.0, `attr.fields()` now returns Any,
+            # so the call to `attribute.type` is not checked.
+            *(attribute.type(hs) for attribute in attr.fields(_EventSourcesInner))
         )
         self.store = hs.get_datastores().main