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