mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-23 00:31:55 +00:00
![]()
Some checks are pending
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / ty completion evaluation (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / check playground (push) Blocked by required conditions
CI / benchmarks instrumented (ruff) (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / Fuzz for new ty panics (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / benchmarks instrumented (ty) (push) Blocked by required conditions
CI / benchmarks walltime (medium|multithreaded) (push) Blocked by required conditions
CI / benchmarks walltime (small|large) (push) Blocked by required conditions
[ty Playground] Release / publish (push) Waiting to run
## 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 |