public AnalysisModuleKey(IPythonModule module) { Name = module.Name; FilePath = module.ModuleType == ModuleType.CompiledBuiltin ? null : module.FilePath; IsTypeshed = module is StubPythonModule stub && stub.IsTypeshed; IsNonUserAsDocument = (module.IsNonUserFile() || module.IsCompiled()) && module is IDocument document && document.IsOpen; }
private static bool IsNonUserAsDocumentModule(IPythonModule module) => (module.IsNonUserFile() || module.IsCompiled()) && module is IDocument document && document.IsOpen;