[flake8-datetimez] Stabilize datetime-min-max (DTZ901)#16635
[flake8-datetimez] Stabilize datetime-min-max (DTZ901)#16635ntBre merged 1 commit intomicha/ruff-0.10from
flake8-datetimez] Stabilize datetime-min-max (DTZ901)#16635Conversation
Summary -- Stabilizes DTZ901, renames the rule function to match the rule name, removes the `preview_rules` test, and handles some nits in the docs (mention `min` first to match the rule name too). Test Plan -- 1 closed issue on 2024-11-12, 4 days after the rule was added. No issues since
CodSpeed Performance ReportMerging #16635 will degrade performances by 12.88%Comparing Summary
Benchmarks breakdown
|
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| DTZ901 | 11 | 11 | 0 | 0 | 0 |
Linter (preview)
✅ ecosystem check detected no linter changes.
|
I think the ecosystem check revealed three false positives: I don't think there's much we can do here because |
|
Django also have a You could maybe let the rule pass if it's wrapped in any |
MichaReiser
left a comment
There was a problem hiding this comment.
Airflow would have to use a noqa comment in this case which is an explicit acknowledgement that they handled the no-timezone case.
This is also not ap roblem specific to DTZ901 (as far as I understand). E.g. https://docs.astral.sh/ruff/rules/call-date-today/ has the same problem that we flag
import datetime
timezone.make_aware(datetime.datetime.today())|
Sounds good, moving forward with stabilization. |
Summary -- Stabilizes DTZ901, renames the rule function to match the rule name, removes the `preview_rules` test, and handles some nits in the docs (mention `min` first to match the rule name too). Test Plan -- 1 closed issue on 2024-11-12, 4 days after the rule was added. No issues since
Summary -- Stabilizes DTZ901, renames the rule function to match the rule name, removes the `preview_rules` test, and handles some nits in the docs (mention `min` first to match the rule name too). Test Plan -- 1 closed issue on 2024-11-12, 4 days after the rule was added. No issues since
Summary
Stabilizes DTZ901, renames the rule function to match the rule name, removes the
preview_rulestest, and handles some nits in the docs (mentionminfirst to match the rule name too).Test Plan
1 closed issue on 2024-11-12, 4 days after the rule was added. No issues since