@@ -19,32 +19,32 @@ import { PipenvStrings } from '../../common/localize';
1919import { NativePythonFinder } from '../common/nativePythonFinder' ;
2020
2121export class PipenvManager implements EnvironmentManager {
22- private collection : PythonEnvironment [ ] = [ ] ;
23- private fsPathToEnv : Map < string , PythonEnvironment > = new Map ( ) ;
24- private globalEnv : PythonEnvironment | undefined ;
25-
2622 private readonly _onDidChangeEnvironment = new EventEmitter < DidChangeEnvironmentEventArgs > ( ) ;
2723 public readonly onDidChangeEnvironment = this . _onDidChangeEnvironment . event ;
2824
2925 private readonly _onDidChangeEnvironments = new EventEmitter < DidChangeEnvironmentsEventArgs > ( ) ;
3026 public readonly onDidChangeEnvironments = this . _onDidChangeEnvironments . event ;
31- constructor ( private readonly nativeFinder : NativePythonFinder , private readonly api : PythonEnvironmentApi ) {
27+
28+ public readonly name : string ;
29+ public readonly displayName : string ;
30+ public readonly preferredPackageManagerId : string ;
31+ public readonly description ?: string ;
32+ public readonly tooltip : string | MarkdownString ;
33+ public readonly iconPath ?: IconPath ;
34+
35+ constructor (
36+ public readonly nativeFinder : NativePythonFinder ,
37+ public readonly api : PythonEnvironmentApi
38+ ) {
3239 this . name = 'pipenv' ;
3340 this . displayName = 'Pipenv' ;
34- this . preferredPackageManagerId = 'ms-python.python:pip ' ;
41+ this . preferredPackageManagerId = 'ms-python.python:pipenv ' ;
3542 this . tooltip = new MarkdownString ( PipenvStrings . pipenvManager , true ) ;
3643 }
3744
38- name : string ;
39- displayName : string ;
40- preferredPackageManagerId : string ;
41- description ?: string ;
42- tooltip : string | MarkdownString ;
43- iconPath ?: IconPath ;
44-
4545 public dispose ( ) {
46- this . collection = [ ] ;
47- this . fsPathToEnv . clear ( ) ;
46+ this . _onDidChangeEnvironment . dispose ( ) ;
47+ this . _onDidChangeEnvironments . dispose ( ) ;
4848 }
4949
5050 quickCreateConfig ?( ) : QuickCreateConfig | undefined {
@@ -65,29 +65,33 @@ export class PipenvManager implements EnvironmentManager {
6565 }
6666
6767 async refresh ( _scope : RefreshEnvironmentsScope ) : Promise < void > {
68- // To be implemented
68+ // TODO: Implement pipenv environment refresh
69+ // This should discover pipenv environments and update the collection
6970 }
7071
7172 async getEnvironments ( _scope : GetEnvironmentsScope ) : Promise < PythonEnvironment [ ] > {
72- // To be implemented
73+ // TODO: Implement pipenv environment discovery
74+ // This should return all discovered pipenv environments
7375 return [ ] ;
7476 }
7577
7678 async set ( _scope : SetEnvironmentScope , _environment ?: PythonEnvironment ) : Promise < void > {
77- // To be implemented
79+ // TODO: Implement setting pipenv environment for a scope
80+ // This should update the selected environment for the given scope
7881 }
7982
8083 async get ( _scope : GetEnvironmentScope ) : Promise < PythonEnvironment | undefined > {
81- // To be implemented
84+ // TODO: Implement getting the selected pipenv environment for a scope
8285 return undefined ;
8386 }
8487
8588 async resolve ( _context : ResolveEnvironmentContext ) : Promise < PythonEnvironment | undefined > {
86- // To be implemented
89+ // TODO: Implement resolving a path to a pipenv environment
8790 return undefined ;
8891 }
8992
9093 async clearCache ?( ) : Promise < void > {
91- // To be implemented
94+ // TODO: Implement cache clearing
95+ // This should clear any cached environment discovery data
9296 }
9397}
0 commit comments