From 23473f17bf8869bb4f335e97402abdeffafd0427 Mon Sep 17 00:00:00 2001 From: Andrey Lebedev Date: Sat, 9 Dec 2023 23:09:23 +0200 Subject: [PATCH] Support mypy-1.7.1 --- setup.cfg | 2 +- src/mypy_zope/plugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9dbf634..1db7a2d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,7 +28,7 @@ packages = zope-stubs package_dir = =src install_requires = - mypy>=1.0.0,<1.6.0 + mypy>=1.0.0,<1.8.0 zope.interface zope.schema include_package_data = True diff --git a/src/mypy_zope/plugin.py b/src/mypy_zope/plugin.py index fcf0999..a285c77 100644 --- a/src/mypy_zope/plugin.py +++ b/src/mypy_zope/plugin.py @@ -496,7 +496,7 @@ def _get_metadata(self, typeinfo: TypeInfo) -> Dict[str, Any]: def _is_interface(self, typeinfo: TypeInfo) -> bool: md = self._get_metadata(typeinfo) - return md.get("is_interface", False) + return cast(bool, md.get("is_interface", False)) def _adjust_interface_function( self,