summary refs log tree commit diff
path: root/scripts-dev
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-09-30 16:37:48 +0100
committerDavid Robertson <davidr@element.io>2022-09-30 16:37:48 +0100
commit8e52cb0bce4c4e42a0f151f16e51529b7aba8f7d (patch)
treed774cbdb7c80fe6bfb9350809397c8d18bffa5ca /scripts-dev
parentUpdate mypy and mypy-zope (#13925) (diff)
downloadsynapse-8e52cb0bce4c4e42a0f151f16e51529b7aba8f7d.tar.xz
Revert "Update mypy and mypy-zope (#13925)"
This reverts commit 6d543d6d9f56e39199b7e460d0081b02d61f12be.
Diffstat (limited to 'scripts-dev')
-rwxr-xr-xscripts-dev/check_pydantic_models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts-dev/check_pydantic_models.py b/scripts-dev/check_pydantic_models.py
index 9f2b7ded5b..d0fb811bdb 100755
--- a/scripts-dev/check_pydantic_models.py
+++ b/scripts-dev/check_pydantic_models.py
@@ -88,9 +88,10 @@ def make_wrapper(factory: Callable[P, R]) -> Callable[P, R]:
 
     @functools.wraps(factory)
     def wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
-        if "strict" not in kwargs:
+        # type-ignore: should be redundant once we can use https://github.com/python/mypy/pull/12668
+        if "strict" not in kwargs:  # type: ignore[attr-defined]
             raise MissingStrictInConstrainedTypeException(factory.__name__)
-        if not kwargs["strict"]:
+        if not kwargs["strict"]:  # type: ignore[index]
             raise MissingStrictInConstrainedTypeException(factory.__name__)
         return factory(*args, **kwargs)