Revert "Update mypy and mypy-zope (#13925)"

This reverts commit 6d543d6d9f.
This commit is contained in:
David Robertson 2022-09-30 16:37:48 +01:00
parent 6d543d6d9f
commit 8e52cb0bce
No known key found for this signature in database
GPG key ID: 903ECE108A39DEDD
10 changed files with 67 additions and 60 deletions

View file

@ -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)