nicoddemus on features
Preparing release version 4.2.0 Merge pull request #4696 from n… Merge pull request #4697 from n… (compare)
plugin_managerhas a "cursor" that identifies which plugin is having its hook called currently?
classmethodi think it should work the way you want
ya... i dont have a registry w names but i kinda just realized that i may want one (because it would allow me to prevent one plugin from raising another plugin's registered check). not too sure about how i'm doing it now anyways because it's in a arbitrary class (as opposed to something aware of the plugin system)
class Check: IDs: Dict[str, List[Any]] def __init__(self, *ids: str): for id_ in ids: if id_ not in self.IDs: raise Exception("not registered") ... @classmethod def register(cls, registrant: Any, ids: List[str]): for id_ in ids: if id_ in cls.IDs: raise Exception("already registered") else: cls.IDs[id_] = registrant
thinking i might move this to my config object (which has the plugin_manager as an attr) so as to be more plugin-aware
selfbeing a class ref