File tree Expand file tree Collapse file tree 18 files changed +131
-18
lines changed
pet-linux-global-python/src
pet-mac-commandlinetools/src
pet-virtualenvwrapper/src Expand file tree Collapse file tree 18 files changed +131
-18
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,9 @@ impl Conda {
146146}
147147
148148impl Locator for Conda {
149+ fn get_name ( & self ) -> & ' static str {
150+ "Conda"
151+ }
149152 fn supported_categories ( & self ) -> Vec < PythonEnvironmentCategory > {
150153 vec ! [ PythonEnvironmentCategory :: Conda ]
151154 }
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ pub struct Configuration {
3434}
3535
3636pub trait Locator : Send + Sync {
37+ /// Returns the name of the locator.
38+ fn get_name ( & self ) -> & ' static str ;
3739 fn configure ( & self , _config : & Configuration ) {
3840 //
3941 }
Original file line number Diff line number Diff line change @@ -98,6 +98,9 @@ fn from(env: &PythonEnv) -> Option<PythonEnvironment> {
9898}
9999
100100impl Locator for Homebrew {
101+ fn get_name ( & self ) -> & ' static str {
102+ "Homebrew"
103+ }
101104 fn supported_categories ( & self ) -> Vec < PythonEnvironmentCategory > {
102105 vec ! [ PythonEnvironmentCategory :: Homebrew ]
103106 }
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ impl Default for LinuxGlobalPython {
2626 }
2727}
2828impl Locator for LinuxGlobalPython {
29+ fn get_name ( & self ) -> & ' static str {
30+ "LinuxGlobalPython"
31+ }
2932 fn supported_categories ( & self ) -> Vec < PythonEnvironmentCategory > {
3033 vec ! [ PythonEnvironmentCategory :: LinuxGlobal ]
3134 }
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ impl Default for MacCmdLineTools {
2828 }
2929}
3030impl Locator for MacCmdLineTools {
31+ fn get_name ( & self ) -> & ' static str {
32+ "MacCmdLineTools"
33+ }
3134 fn supported_categories ( & self ) -> Vec < PythonEnvironmentCategory > {
3235 vec ! [ PythonEnvironmentCategory :: MacCommandLineTools ]
3336 }
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ impl Default for MacPythonOrg {
2727 }
2828}
2929impl Locator for MacPythonOrg {
30+ fn get_name ( & self ) -> & ' static str {
31+ "MacPythonOrg"
32+ }
3033 fn supported_categories ( & self ) -> Vec < PythonEnvironmentCategory > {
3134 vec ! [ PythonEnvironmentCategory :: MacPythonOrg ]
3235 }
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ impl Default for MacXCode {
2525 }
2626}
2727impl Locator for MacXCode {
28+ fn get_name ( & self ) -> & ' static str {
29+ "MacXCode"
30+ }
2831 fn supported_categories ( & self ) -> Vec < PythonEnvironmentCategory > {
2932 vec ! [ PythonEnvironmentCategory :: MacCommandLineTools ]
3033 }
Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ impl PipEnv {
7171 }
7272}
7373impl Locator for PipEnv {
74+ fn get_name ( & self ) -> & ' static str {
75+ "PipEnv"
76+ }
7477 fn supported_categories ( & self ) -> Vec < PythonEnvironmentCategory > {
7578 vec ! [ PythonEnvironmentCategory :: Pipenv ]
7679 }
Original file line number Diff line number Diff line change @@ -134,6 +134,9 @@ impl Poetry {
134134}
135135
136136impl Locator for Poetry {
137+ fn get_name ( & self ) -> & ' static str {
138+ "Poetry"
139+ }
137140 fn configure ( & self , config : & Configuration ) {
138141 if let Some ( search_paths) = & config. search_paths {
139142 if !search_paths. is_empty ( ) {
Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ impl PyEnv {
4848}
4949
5050impl Locator for PyEnv {
51+ fn get_name ( & self ) -> & ' static str {
52+ "PyEnv"
53+ }
5154 fn supported_categories ( & self ) -> Vec < PythonEnvironmentCategory > {
5255 vec ! [
5356 PythonEnvironmentCategory :: Pyenv ,
You can’t perform that action at this time.
0 commit comments