Coverage for /pythoncovmergedfiles/medio/medio/usr/lib/python3.9/zoneinfo/__init__.py: 86%

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__all__ = [ 

2 "ZoneInfo", 

3 "reset_tzpath", 

4 "available_timezones", 

5 "TZPATH", 

6 "ZoneInfoNotFoundError", 

7 "InvalidTZPathWarning", 

8] 

9 

10from . import _tzpath 

11from ._common import ZoneInfoNotFoundError 

12 

13try: 

14 from _zoneinfo import ZoneInfo 

15except ImportError: # pragma: nocover 

16 from ._zoneinfo import ZoneInfo 

17 

18reset_tzpath = _tzpath.reset_tzpath 

19available_timezones = _tzpath.available_timezones 

20InvalidTZPathWarning = _tzpath.InvalidTZPathWarning 

21 

22 

23def __getattr__(name): 

24 if name == "TZPATH": 

25 return _tzpath.TZPATH 

26 else: 

27 raise AttributeError(f"module {__name__!r} has no attribute {name!r}") 

28 

29 

30def __dir__(): 

31 return sorted(list(globals()) + ["TZPATH"])