MCPcopy Create free account
hub / github.com/libgit2/pygit2 / str_to_bytes

Function str_to_bytes

pygit2/config.py:46–50  ·  view source on GitHub ↗
(value: str | PathLike[str] | bytes, name: str)

Source from the content-addressed store, hash-verified

44
45
46def str_to_bytes(value: str | PathLike[str] | bytes, name: str) -> bytes:
47 if not isinstance(value, str):
48 raise TypeError(f'{name} must be a string')
49
50 return to_bytes(value)
51
52
53class ConfigIterator:

Callers 7

__init__Method · 0.85
_getMethod · 0.85
__setitem__Method · 0.85
__delitem__Method · 0.85
get_multivarMethod · 0.85
set_multivarMethod · 0.85
delete_multivarMethod · 0.85

Calls 1

to_bytesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…