fix: datetime comparison in QB by ankush [frappe] PR#26364
From: https://github.com/frappe/frappe/pull/26364
Date: 2024-05-09 15:49:27+05:30
- fix: datetime comparison in QB (#26364)
Diagnostics
pre-commit failed for source commit: 5de5e25df615ba14db96bc020419005cab0f4904
Run ruff linter..........................................................Failed
- hook id: ruff
- exit code: 1
frappe/database/database.py:66:21: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
frappe/database/database.py:67:22: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
frappe/database/database.py:69:20: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
frappe/tests/test_db.py:339:20: RUF015 Prefer `next(...)` over single element slice
frappe/tests/test_db.py:341:4: RUF015 Prefer `next(...)` over single element slice
frappe/tests/test_db.py:346:4: RUF015 Prefer `next(...)` over single element slice
frappe/tests/test_db.py:357:4: RUF015 Prefer `next(...)` over single element slice
frappe/tests/test_db.py:368:4: RUF015 Prefer `next(...)` over single element slice
Found 8 errors.
No fixes available (5 hidden fixes can be enabled with the `--unsafe-fixes` option).
Checkout instructions
# Checkout locally
git fetch upstream
git switch ft-pr-26364
# Alternatively, re-take the changes
git switch develop
ft take ft-pr-26364
# Make changes then rebase
git rebase -i develop
# Fix or ignore conflicts
git checkout --theirs .
git rebase --continue
# Force-push changes
git push --force-with-lease