MCPcopy
hub / github.com/beetbox/beets / _parse

Method _parse

beets/dbcore/db.py:713–718  ·  view source on GitHub ↗

Parse a string as a value for the given key.

(cls, key, string: str)

Source from the content-addressed store, hash-verified

711
712 @classmethod
713 def _parse(cls, key, string: str) -> Any:
714 """Parse a string as a value for the given key."""
715 if not isinstance(string, str):
716 raise TypeError("_parse() argument must be a string")
717
718 return cls._type(key).parse(string)
719
720 def set_parse(self, key, string: str):
721 """Set the object's key to a value represented by a string."""

Callers 7

set_parseMethod · 0.95
test_parse_nonstringMethod · 0.80
test_parse_flex_fieldMethod · 0.80
_normparseFunction · 0.80
modify_itemsFunction · 0.80

Calls 2

_typeMethod · 0.80
parseMethod · 0.45

Tested by 5

test_parse_nonstringMethod · 0.64
test_parse_flex_fieldMethod · 0.64
_normparseFunction · 0.64