Skip to content

Commit 7fcd09a

Browse files
committed
[dateutil] Check platform before imports
Otherwise imports may fail on other platforms.
1 parent 14968e6 commit 7fcd09a

File tree

1 file changed

+4
-5
lines changed
  • stubs/python-dateutil/dateutil/tz

1 file changed

+4
-5
lines changed

stubs/python-dateutil/dateutil/tz/win.pyi

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import sys
2-
from ctypes import _NameTypes, _Pointer, c_wchar
3-
from datetime import datetime, timedelta
4-
from typing import Any, ClassVar, Final
5-
6-
from dateutil.tz import tzwin as tzwin, tzwinlocal as tzwinlocal
72

83
if sys.platform == "win32":
4+
from ctypes import _NameTypes, _Pointer, c_wchar
5+
from datetime import datetime, timedelta
6+
from dateutil.tz import tzwin as tzwin, tzwinlocal as tzwinlocal
7+
from typing import Any, ClassVar, Final
98
from winreg import _KeyType
109

1110
__all__ = ["tzwin", "tzwinlocal", "tzres"]

0 commit comments

Comments
 (0)