Beispiel #1
0
 def _resolve_plugin_locations(self):
   # We jump through some hoops here to avoid a live resolve if possible for purposes of speed.
   # Even with a local resolve cache fully up to date, running a resolve to activate a plugin
   # takes ~250ms whereas loading from a pre-cached list takes ~50ms.
   if all(requirement_is_exact(Requirement.parse(req)) for req in self._plugin_requirements):
     return self._resolve_exact_plugin_locations()
   else:
     return (plugin.location for plugin in self._resolve_plugins())
Beispiel #2
0
 def _resolve_plugin_locations(self):
   # We jump through some hoops here to avoid a live resolve if possible for purposes of speed.
   # Even with a local resolve cache fully up to date, running a resolve to activate a plugin
   # takes ~250ms whereas loading from a pre-cached list takes ~50ms.
   if all(requirement_is_exact(Requirement.parse(req)) for req in self._plugin_requirements):
     return self._resolve_exact_plugin_locations()
   else:
     return (plugin.location for plugin in self._resolve_plugins())
Beispiel #3
0
 def exact(self):
     return requirement_is_exact(self.requirement)