ruff
32bb6cfe - [`flake8-datetimez`] Clarify naming guidance for `datetime.today` (`DTZ002`) (#26658)

Commit
1 day ago
[`flake8-datetimez`] Clarify naming guidance for `datetime.today` (`DTZ002`) (#26658) ## Summary This updates the DTZ002 documentation to clarify the `datetime.today()` naming confusion raised in #23392. - Notes that `datetime.datetime.today()` is named like a date helper, but it returns a local `datetime`. - Keeps the existing guidance to use timezone-aware `datetime.now(...)` when you need an aware timestamp. ## Why this changed The code behavior is already correct; this is a docs-only improvement to make the rule intent easier to understand. ## Test Plan - `cargo dev generate-docs` - `cargo fmt --check --all` - `PATH="$PWD/target/debug:$PATH" uv run --only-group dev --locked python scripts/check_docs_formatted.py` --------- Co-authored-by: Mahadev Annabhimoju <219508079+Joosboy@users.noreply.github.com> Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
Author
Parents
Loading