ruff/crates/ruff_linter
ageorgou bbd3856de8
[`flake8-datetimez`] Clarify docs for several rules (#20778)
## 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.
2025-10-10 13:02:24 +00:00
..
resources [`flake8-logging-format`] Avoid dropping implicitly concatenated pieces in the `G004` fix (#20793) 2025-10-09 18:14:38 -04:00
src [`flake8-datetimez`] Clarify docs for several rules (#20778) 2025-10-10 13:02:24 +00:00
Cargo.toml Bump 0.14.0 (#20751) 2025-10-07 11:05:47 -07:00