12
12
from json .decoder import JSONDecodeError
13
13
14
14
import click
15
- import pkg_resources
15
+
16
16
from rich .console import Console
17
17
from rich .syntax import Syntax
18
18
23
23
24
24
# pylint: disable=too-many-instance-attributes, invalid-name
25
25
26
- # Calling pkg_resources.iter_entry_points shows a false-positive
27
- # pylint: disable=no-member
28
-
29
26
30
27
class Environment (object ):
31
28
"""Provides access to the current CLI environment."""
@@ -165,8 +162,6 @@ def load(self):
165
162
166
163
self .load_modules_from_python (routes .ALL_ROUTES )
167
164
self .aliases .update (routes .ALL_ALIASES )
168
- self ._load_modules_from_entry_points ('softlayer.cli' )
169
-
170
165
self ._modules_loaded = True
171
166
172
167
def load_modules_from_python (self , route_list ):
@@ -178,20 +173,6 @@ def load_modules_from_python(self, route_list):
178
173
path , attr = modpath , None
179
174
self .commands [name ] = ModuleLoader (path , attr = attr )
180
175
181
- def _load_modules_from_entry_points (self , entry_point_group ):
182
- """Load modules from the entry_points (slower).
183
-
184
- Entry points can be used to add new commands to the CLI.
185
-
186
- Usage:
187
-
188
- entry_points={'softlayer.cli': ['new-cmd = mymodule.new_cmd.cli']}
189
-
190
- """
191
- for obj in pkg_resources .iter_entry_points (group = entry_point_group ,
192
- name = None ):
193
- self .commands [obj .name ] = obj
194
-
195
176
def ensure_client (self , config_file = None , is_demo = False , proxy = None ):
196
177
"""Create a new SLAPI client to the environment.
197
178
0 commit comments