mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
21 lines
422 B
Python
21 lines
422 B
Python
import datetime
|
|
|
|
# no args
|
|
datetime.datetime.fromtimestamp(1234)
|
|
|
|
# wrong keywords
|
|
datetime.datetime.fromtimestamp(1234, bad=datetime.timezone.utc)
|
|
|
|
# none args
|
|
datetime.datetime.fromtimestamp(1234, None)
|
|
|
|
# none keywords
|
|
datetime.datetime.fromtimestamp(1234, tz=None)
|
|
|
|
from datetime import datetime
|
|
|
|
# no args unqualified
|
|
datetime.fromtimestamp(1234)
|
|
|
|
# uses `astimezone` method
|
|
datetime.fromtimestamp(1234).astimezone()
|