Skip to content

Commit 32a5e0d

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

File tree

1 file changed

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

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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 typing import Any, ClassVar, Final
97
from winreg import _KeyType
108

9+
from dateutil.tz import tzwin as tzwin, tzwinlocal as tzwinlocal
10+
1111
__all__ = ["tzwin", "tzwinlocal", "tzres"]
1212

1313
ONEWEEK: timedelta

0 commit comments

Comments
 (0)