Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object.
(self)
| 171 | vars(self).update(name=name, value=value, group=group) |
| 172 | |
| 173 | def load(self) -> Any: |
| 174 | """Load the entry point from its definition. If only a module |
| 175 | is indicated by the value, return that module. Otherwise, |
| 176 | return the named object. |
| 177 | """ |
| 178 | match = cast(Match, self.pattern.match(self.value)) |
| 179 | module = import_module(match.group('module')) |
| 180 | attrs = filter(None, (match.group('attr') or '').split('.')) |
| 181 | return functools.reduce(getattr, attrs, module) |
| 182 | |
| 183 | @property |
| 184 | def module(self) -> str: |