mirror of https://github.com/astral-sh/ruff
## Summary Resolves #19384. - Distinguishes more clearly between `date` and `datetime` objects. - Uniformly links to the relevant Python docs from rules in this category. I've tried to be clearer, but there's still a contradiction in the rules as written: we say "use timezone-aware objects", but `date`s are inherently timezone-naive. Also, the full docs don't always match the error message: for instance, in [DTZ012](https://docs.astral.sh/ruff/rules/call-date-fromtimestamp/), the example says to use: ```python datetime.datetime.fromtimestamp(946684800, tz=datetime.UTC) ``` while `fix_title` returns "Use `datetime.datetime.fromtimestamp(ts, tz=...)**.date()**` instead". I have left this as it was for now. ## Test Plan Ran `mkdocs` locally and inspected result. |
||
|---|---|---|
| .. | ||
| resources | ||
| src | ||
| Cargo.toml | ||