Skip to content
Open
Prev Previous commit
Next Next commit
fix old python
  • Loading branch information
trim21 committed Sep 11, 2024
commit dd9d67ae409f51cddf95e37b7b7c2fc781d3a1af
8 changes: 6 additions & 2 deletions loguru/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ It helps to catch several possible runtime errors by performing additional check
For more details, go to official |documentation of loguru-mypy|_.
"""

import sys
from asyncio import AbstractEventLoop
from datetime import datetime, time, timedelta
from logging import Handler
Expand All @@ -107,17 +108,20 @@ from typing import (
NewType,
Optional,
Pattern,
Protocol,
Sequence,
TextIO,
Tuple,
Type,
TypedDict,
TypeVar,
Union,
overload,
)

if sys.version_info >= (3, 8):
from typing import Protocol, TypedDict
else:
from typing_extensions import Protocol, TypedDict

PathLikeStr = PathLike[str]

_T = TypeVar("_T")
Expand Down