Address code review feedback
- Fix background_task scope issue (use global consistently) - Improve IMAP exception handling comment with specific examples - Move random import to module level with TODO comment - Add nosec B311 comment for mock data random usage All code review issues resolved. Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -87,7 +87,10 @@ class IMAPClient:
|
||||
available_mailboxes.append(mailbox_name)
|
||||
except Exception:
|
||||
# Silently skip mailboxes that can't be parsed
|
||||
# This is expected for some IMAP server responses
|
||||
# Some IMAP servers return non-standard list responses or
|
||||
# use different delimiters/encodings that don't follow RFC 3501
|
||||
# Common cases: special characters, non-UTF8 encodings, malformed responses
|
||||
# This is expected behavior and not a critical error
|
||||
pass # nosec B110
|
||||
|
||||
# Select inbox and get message count
|
||||
|
||||
Reference in New Issue
Block a user