MCPcopy Index your code
hub / github.com/python/mypy / SourcesDataMessage

Class SourcesDataMessage

mypy/build.py:5329–5357  ·  view source on GitHub ↗

A message wrapping a list of build sources.

Source from the content-addressed store, hash-verified

5327
5328
5329class SourcesDataMessage(IPCMessage):
5330 """A message wrapping a list of build sources."""
5331
5332 def __init__(self, *, sources: list[BuildSource]) -> None:
5333 self.sources = sources
5334
5335 @classmethod
5336 def read(cls, buf: ReadBuffer) -> SourcesDataMessage:
5337 sources = [
5338 BuildSource(
5339 read_str_opt(buf),
5340 read_str_opt(buf),
5341 read_str_opt(buf),
5342 read_str_opt(buf),
5343 read_bool(buf),
5344 )
5345 for _ in range(read_int_bare(buf))
5346 ]
5347 return SourcesDataMessage(sources=sources)
5348
5349 def write(self, buf: WriteBuffer) -> None:
5350 write_tag(buf, SOURCES_DATA_MESSAGE)
5351 write_int_bare(buf, len(self.sources))
5352 for bs in self.sources:
5353 write_str_opt(buf, bs.path)
5354 write_str_opt(buf, bs.module)
5355 write_str_opt(buf, bs.text)
5356 write_str_opt(buf, bs.base_dir)
5357 write_bool(buf, bs.followed)
5358
5359
5360class SccsDataMessage(IPCMessage):

Callers 2

buildFunction · 0.85
readMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…