mirror of
https://github.com/python/cpython.git
synced 2024-11-24 02:15:30 +08:00
6ae254aaa0
Tools such as ruff can ignore "imported but unused" warnings if a line ends with "# noqa: F401". It avoids the temptation to remove an import which is used effectively.
10 lines
296 B
Python
10 lines
296 B
Python
try:
|
|
from _datetime import *
|
|
from _datetime import __doc__ # noqa: F401
|
|
except ImportError:
|
|
from _pydatetime import *
|
|
from _pydatetime import __doc__ # noqa: F401
|
|
|
|
__all__ = ("date", "datetime", "time", "timedelta", "timezone", "tzinfo",
|
|
"MINYEAR", "MAXYEAR", "UTC")
|