(cls, ignore_disabled=True)
| 69 | |
| 70 | @classmethod |
| 71 | def load_handlers(cls, ignore_disabled=True): |
| 72 | global HANDLERS |
| 73 | |
| 74 | if not HANDLERS: |
| 75 | handlers = {} |
| 76 | for x in pkg_resources.iter_entry_points("aura.uri_handlers"): |
| 77 | try: |
| 78 | hook = x.load() |
| 79 | handlers[hook.scheme] = hook |
| 80 | if hook.default and not cls.default: |
| 81 | cls.default = hook |
| 82 | except FeatureDisabled as exc: |
| 83 | if not ignore_disabled: |
| 84 | handlers.setdefault("disabled", {})[x.name] = exc.args[0] |
| 85 | |
| 86 | HANDLERS = handlers |
| 87 | return HANDLERS |
| 88 | |
| 89 | @property |
| 90 | def metadata(self) -> dict: |
no outgoing calls
no test coverage detected