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

Class ModuleResult

mypy/build.py:5243–5261  ·  view source on GitHub ↗

A simple class representing the result of type-checking phase for a single module. Non-None interface hash signifies this is a result of checking the interface of the module, otherwise this is a result of checking the implementation (which includes errors encountered during both phases)

Source from the content-addressed store, hash-verified

5241
5242
5243class ModuleResult:
5244 """A simple class representing the result of type-checking phase for a single module.
5245
5246 Non-None interface hash signifies this is a result of checking the interface
5247 of the module, otherwise this is a result of checking the implementation (which
5248 includes errors encountered during both phases).
5249 """
5250
5251 def __init__(self, interface_hash: str | None, error_lines: list[str]) -> None:
5252 self.interface_hash = interface_hash
5253 self.error_lines = error_lines
5254
5255 @classmethod
5256 def read(cls, buf: ReadBuffer) -> ModuleResult:
5257 return ModuleResult(read_str_opt(buf), read_str_list(buf))
5258
5259 def write(self, buf: WriteBuffer) -> None:
5260 write_str_opt(buf, self.interface_hash)
5261 write_str_list(buf, self.error_lines)
5262
5263
5264class SccResponseMessage(IPCMessage):

Callers 3

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…