summary refs log tree commit diff
path: root/synapse/events/validator.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/events/validator.py')
-rw-r--r--synapse/events/validator.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/events/validator.py b/synapse/events/validator.py
index 4245573017..360d24274a 100644
--- a/synapse/events/validator.py
+++ b/synapse/events/validator.py
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import collections.abc
-from typing import Iterable, Union
+from typing import Iterable, Type, Union
 
 import jsonschema
 
@@ -246,9 +246,7 @@ POWER_LEVELS_SCHEMA = {
 
 # This could return something newer than Draft 7, but that's the current "latest"
 # validator.
-#
-# See https://github.com/python/typeshed/issues/7028 for the ignored return type.
-def _create_power_level_validator() -> jsonschema.Draft7Validator:  # type: ignore[valid-type]
+def _create_power_level_validator() -> Type[jsonschema.Draft7Validator]:
     validator = jsonschema.validators.validator_for(POWER_LEVELS_SCHEMA)
 
     # by default jsonschema does not consider a frozendict to be an object so