MCPcopy Create free account
hub / github.com/rthalley/dnspython / _from_text

Function _from_text

dns/flags.py:51–56  ·  view source on GitHub ↗
(text: str, enum_class: Any)

Source from the content-addressed store, hash-verified

49
50
51def _from_text(text: str, enum_class: Any) -> int:
52 flags = 0
53 tokens = text.split()
54 for t in tokens:
55 flags |= enum_class[t.upper()]
56 return flags
57
58
59def _to_text(flags: int, enum_class: Any) -> str:

Callers 2

from_textFunction · 0.70
edns_from_textFunction · 0.70

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…