MCPcopy
hub / github.com/PokemonGoF/PokemonGo-Bot / load_plugin

Method load_plugin

pokemongo_bot/plugin_loader.py:23–36  ·  view source on GitHub ↗
(self, plugin)

Source from the content-addressed store, hash-verified

21 return correct_path
22
23 def load_plugin(self, plugin):
24 github_plugin = GithubPlugin(plugin)
25 if github_plugin.is_valid_plugin():
26 if not github_plugin.is_already_installed():
27 github_plugin.install()
28
29 correct_path = github_plugin.get_plugin_folder()
30
31 else:
32 correct_path = self._get_correct_path(plugin)
33
34 if correct_path not in self.folder_cache:
35 self.folder_cache.append(correct_path)
36 sys.path.append(correct_path)
37
38 def remove_path(self, path):
39 correct_path = self._get_correct_path(path)

Callers 7

init_configFunction · 0.95
test_load_plugin_taskMethod · 0.95
test_load_zipMethod · 0.80

Calls 6

is_valid_pluginMethod · 0.95
is_already_installedMethod · 0.95
installMethod · 0.95
get_plugin_folderMethod · 0.95
_get_correct_pathMethod · 0.95
GithubPluginClass · 0.85