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

Method report_config_data

mypy/plugin.py:550–571  ·  view source on GitHub ↗

Get representation of configuration data for a module. The data must be encodable as JSON and will be stored in the cache metadata for the module. A mismatch between the cached values and the returned will result in that module's cache being invalidated and the modul

(self, ctx: ReportConfigContext)

Source from the content-addressed store, hash-verified

548 return lookup_fully_qualified(fullname, self._modules)
549
550 def report_config_data(self, ctx: ReportConfigContext) -> Any:
551 """Get representation of configuration data for a module.
552
553 The data must be encodable as JSON and will be stored in the
554 cache metadata for the module. A mismatch between the cached
555 values and the returned will result in that module's cache
556 being invalidated and the module being rechecked.
557
558 This can be called twice for each module, once after loading
559 the cache to check if it is valid and once while writing new
560 cache information.
561
562 If is_check in the context is true, then the return of this
563 call will be checked against the cached version. Otherwise the
564 call is being made to determine what to put in the cache. This
565 can be used to allow consulting extra cache files in certain
566 complex situations.
567
568 This can be used to incorporate external configuration information
569 that might require changes to typechecking.
570 """
571 return None
572
573 def get_additional_deps(self, file: MypyFile) -> list[tuple[int, str, int]]:
574 """Customize dependencies for a module.

Callers 3

find_cache_metaFunction · 0.45
write_cacheFunction · 0.45
report_config_dataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected