Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/icalendar/compatibility.py: 50%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

14 statements  

1"""This module contains compatibility code for older Python versions.""" 

2 

3 

4try: 

5 from typing import Self 

6except ImportError: 

7 try: 

8 from typing_extensions import Self 

9 except ImportError: 

10 Self = "Self" 

11 

12try: 

13 import zoneinfo 

14except ImportError: 

15 import backports.zoneinfo as zoneinfo 

16 

17ZoneInfo = zoneinfo.ZoneInfo 

18 

19__all__ = [ 

20 "Self", 

21 "ZoneInfo", 

22 "zoneinfo", 

23]