Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/scrapy/scrapy
/ _to_bytes_or_none
Function
_to_bytes_or_none
scrapy/mail.py:49–52 ·
view source on GitHub ↗
(text: str | bytes | None)
Source
from the content-addressed store, hash-verified
47
48
49
def
_to_bytes_or_none(text: str | bytes | None) -> bytes | None:
50
if
text is None:
51
return
None
52
return
to_bytes(text)
53
54
55
warnings.warn(
Callers
1
__init__
Method · 0.85
Calls
1
to_bytes
Function · 0.90
Tested by
no test coverage detected