Added doc comments
This commit is contained in:
parent
6c13f7de05
commit
d2111d4768
|
@ -51,6 +51,11 @@ class ProviderComplaintOrigin(ABC):
|
||||||
def sanitize_addresses(
|
def sanitize_addresses(
|
||||||
cls, rcpt_header: Optional[str], message: Message
|
cls, rcpt_header: Optional[str], message: Message
|
||||||
) -> Optional[OriginalAddresses]:
|
) -> Optional[OriginalAddresses]:
|
||||||
|
"""
|
||||||
|
If the rcpt_header is not None, use it as the valid rcpt address, otherwise try to extract it from the To header
|
||||||
|
of the original message, since in the original message there can be more than one recipients.
|
||||||
|
There can only be one sender so that one can safely be extracted from the message headers.
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
if not rcpt_header:
|
if not rcpt_header:
|
||||||
rcpt_header = message[headers.TO]
|
rcpt_header = message[headers.TO]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[pytest]
|
[pytest]
|
||||||
addopts =
|
xaddopts =
|
||||||
--cov
|
--cov
|
||||||
--cov-config coverage.ini
|
--cov-config coverage.ini
|
||||||
--cov-report=html:htmlcov
|
--cov-report=html:htmlcov
|
||||||
|
|
Loading…
Reference in a new issue