feat: (IMAP) Always BCC by 0xD0M1M0 [frappe] PR#28961
From: https://github.com/frappe/frappe/pull/28961
Date: 2025-02-20 12:47:17+01:00
- feat: (IMAP) Always BCC (#28961)
Diagnostics
pre-commit failed for source commit: 7b96f199172592a80b4eec35a7c4f3e66ff4c428
[WARNING] top-level `default_stages` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this.
frappe/email/doctype/email_account/email_account.py:45:15: RUF005 Consider `[*list(kwargs.values()), "default"]` instead of concatenation
|
44 | cached_accounts = getattr(frappe.local, cache_name)
45 | match_by = list(kwargs.values()) + ["default"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUF005
46 | matched_accounts = list(filter(None, [cached_accounts.get(key) for key in match_by]))
47 | if matched_accounts:
|
= help: Replace with `[*list(kwargs.values()), "default"]`
frappe/email/doctype/email_account/email_account.py:52:32: RUF015 Prefer `next(iter(matched_accounts.values()))` over single element slice
|
50 | matched_accounts = func(*args, **kwargs)
51 | cached_accounts.update(matched_accounts or {})
52 | return matched_accounts and list(matched_accounts.values())[0]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUF015
53 |
54 | return wrapper_cache_email_account
|
= help: Replace with `next(iter(matched_accounts.values()))`
Found 2 errors.
No fixes available (2 hidden fixes can be enabled with the `--unsafe-fixes` option).
Checkout instructions
# Checkout locally
git fetch upstream
git switch ft-pr-28961
# Alternatively, re-take the changes
git switch develop
ft take ft-pr-28961
# 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