diff options
author | David Robertson <davidr@element.io> | 2022-04-27 14:10:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 13:10:31 +0000 |
commit | 30c8e7e408322967e5beb2a64ef5f796cb8df226 (patch) | |
tree | 1d65d45fd7ddf5735c80282c62ae1cc5aae2b708 /scripts-dev/mypy_synapse_plugin.py | |
parent | Remove unused `# type: ignore`s (#12531) (diff) | |
download | synapse-30c8e7e408322967e5beb2a64ef5f796cb8df226.tar.xz |
Make `scripts-dev` pass `mypy --disallow-untyped-defs` (#12356)
Not enforced in config yet. One day.
Diffstat (limited to 'scripts-dev/mypy_synapse_plugin.py')
-rw-r--r-- | scripts-dev/mypy_synapse_plugin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts-dev/mypy_synapse_plugin.py b/scripts-dev/mypy_synapse_plugin.py index 1217e14874..c775865212 100644 --- a/scripts-dev/mypy_synapse_plugin.py +++ b/scripts-dev/mypy_synapse_plugin.py @@ -16,7 +16,7 @@ can crop up, e.g the cache descriptors. """ -from typing import Callable, Optional +from typing import Callable, Optional, Type from mypy.nodes import ARG_NAMED_OPT from mypy.plugin import MethodSigContext, Plugin @@ -94,7 +94,7 @@ def cached_function_method_signature(ctx: MethodSigContext) -> CallableType: return signature -def plugin(version: str): +def plugin(version: str) -> Type[SynapsePlugin]: # This is the entry point of the plugin, and let's us deal with the fact # that the mypy plugin interface is *not* stable by looking at the version # string. |