Skip to main content

collect_python_semantic_diagnostics

Function collect_python_semantic_diagnostics 

Source
pub fn collect_python_semantic_diagnostics(
    py: &dyn PythonSource,
    support: &dyn BoundedDefinitionLookup,
    file: &ProjectFile,
    source: &str,
) -> Vec<PythonSemanticDiagnostic>
Expand description

Collect conservative Python unresolved-name diagnostics.

This pass intentionally emits only for bare-name references. It suppresses files that use dynamic namespace features or unresolved wildcard imports, and it never diagnoses attribute/member names. Python programs commonly use optional imports, sys.path mutation, module __getattr__, monkey-patched attributes, and dynamic imports; those cases make absence unknowable without a fuller Python runtime model.