module documentation
(source)

Server for mypy daemon mode.

This implements a daemon process which keeps useful state in memory to enable fine-grained incremental reprocessing of changes.

Class ​Server No class docstring; 0/9 instance variable, 17/27 methods documented
Function daemonize Create the daemon process via "dmypy daemon" and pass options via command line
Function filter​_out​_missing​_top​_level​_packages Quickly filter out obviously missing top-level packages.
Function find​_all​_sources​_in​_build Undocumented
Function fix​_module​_deps After an incremental update, update module dependencies to reflect the new state.
Function get​_meminfo Undocumented
Function ignore​_suppressed​_imports Can we skip looking for newly unsuppressed imports to module?
Function process​_start​_options Undocumented
Constant CONNECTION​_NAME Undocumented
Constant MEM​_PROFILE Undocumented
Constant ​Mi​B Undocumented
Variable ​Changes​And​Removals Undocumented
Variable ​Module​Path​Pair Undocumented
Variable ​Module​Path​Pairs Undocumented
def daemonize(options, status_file, timeout=None, log_file=None): (source)

Create the daemon process via "dmypy daemon" and pass options via command line

When creating the daemon grandchild, we create it in a new console, which is started hidden. We cannot use DETACHED_PROCESS since it will cause console windows to pop up when starting. See https://github.com/python/cpython/pull/4150#issuecomment-340215696 for more on why we can't have nice things.

It also pickles the options to be unpickled by mypy.

Parameters
options:OptionsUndocumented
status​_file:strUndocumented
timeout:Optional[int]Undocumented
log​_file:Optional[str]Undocumented
Returns
intUndocumented
def filter_out_missing_top_level_packages(packages, search_paths, fscache): (source)

Quickly filter out obviously missing top-level packages.

Return packages with entries that can't be found removed.

This is approximate: some packages that aren't actually valid may be included. However, all potentially valid packages must be returned.

Parameters
packages:Set[str]Undocumented
search​_paths:SearchPathsUndocumented
fscache:FileSystemCacheUndocumented
Returns
Set[str]Undocumented
def find_all_sources_in_build(graph, extra=()): (source)

Undocumented

Parameters
graph:mypy.build.GraphUndocumented
extra:Sequence[BuildSource]Undocumented
Returns
List[BuildSource]Undocumented
def fix_module_deps(graph): (source)

After an incremental update, update module dependencies to reflect the new state.

This can make some suppressed dependencies non-suppressed, and vice versa (if modules have been added to or removed from the build).

Parameters
graph:mypy.build.GraphUndocumented
def get_meminfo(): (source)

Undocumented

Returns
Dict[str, Any]Undocumented
def ignore_suppressed_imports(module): (source)
Can we skip looking for newly unsuppressed imports to module?
Parameters
module:strUndocumented
Returns
boolUndocumented
def process_start_options(flags, allow_sources): (source)

Undocumented

Parameters
flags:List[str]Undocumented
allow​_sources:boolUndocumented
Returns
OptionsUndocumented
CONNECTION_NAME: str = (source)

Undocumented

Value
'dmypy'
MEM_PROFILE: bool = (source)

Undocumented

Value
False

Undocumented

Value
2**20
ChangesAndRemovals = (source)

Undocumented

ModulePathPair = (source)

Undocumented

ModulePathPairs = (source)

Undocumented