Ejemplo n.º 1
0
        protected ModuleResolutionBase(string root, IServiceContainer services)
        {
            Root       = root;
            Services   = services;
            FileSystem = services.GetService <IFileSystem>();

            Interpreter = services.GetService <IPythonInterpreter>();
            StubCache   = services.GetService <IStubCache>();
            Log         = services.GetService <ILogger>();
        }
        private static BuiltinsPythonModule CreateBuiltinsModule(IServiceContainer services, IPythonInterpreter interpreter, IStubCache stubCache)
        {
            var moduleName = BuiltinTypeId.Unknown.GetModuleName(interpreter.LanguageVersion);
            var modulePath = stubCache.GetCacheFilePath(interpreter.Configuration.InterpreterPath);

            return(new BuiltinsPythonModule(moduleName, modulePath, services));
        }