MCPcopy
hub / github.com/python/mypy / write_flags

Function write_flags

mypy/nodes.py:5229–5235  ·  view source on GitHub ↗
(data: WriteBuffer, flags: list[bool])

Source from the content-addressed store, hash-verified

5227
5228
5229def write_flags(data: WriteBuffer, flags: list[bool]) -> None:
5230 assert len(flags) <= 26, "This many flags not supported yet"
5231 packed = 0
5232 for i, flag in enumerate(flags):
5233 if flag:
5234 packed |= 1 << i
5235 write_int(data, packed)
5236
5237
5238def read_flags(data: ReadBuffer, num_flags: int) -> list[bool]:

Callers 4

writeMethod · 0.85
writeMethod · 0.85
writeMethod · 0.85
writeMethod · 0.85

Calls 3

write_intFunction · 0.90
lenFunction · 0.85
enumerateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…