From d382d41473cfd84381e6f2359f965a77441ffb6e Mon Sep 17 00:00:00 2001 From: Phillip Verheyden Date: Mon, 6 Mar 2023 10:29:30 -0600 Subject: [PATCH] Support mypy > 1.0.0 Fixes #184 --- loguru_mypy/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loguru_mypy/__init__.py b/loguru_mypy/__init__.py index 82c8a2a..6337601 100644 --- a/loguru_mypy/__init__.py +++ b/loguru_mypy/__init__.py @@ -241,7 +241,7 @@ def __init__(self, version: str) -> None: def plugin(version: str) -> t.Type[LoguruPlugin]: - minor = int(version.split('.')[1].replace('+dev', '')) - if minor < 770: + version_info = tuple(int(v.replace('+dev', '')) for v in version.split('.')) + if version_info < (0, 770): raise UnsupportedMypyVersion(version) return LoguruPlugin