Load the extensions from the list and bind it to the environment. Returns a dict of instantiated environments.
(environment, extensions)
| 76 | |
| 77 | |
| 78 | def load_extensions(environment, extensions): |
| 79 | """Load the extensions from the list and bind it to the environment. |
| 80 | Returns a dict of instantiated environments. |
| 81 | """ |
| 82 | result = {} |
| 83 | for extension in extensions: |
| 84 | if isinstance(extension, string_types): |
| 85 | extension = import_string(extension) |
| 86 | result[extension.identifier] = extension(environment) |
| 87 | return result |
| 88 | |
| 89 | |
| 90 | def fail_for_missing_callable(string, name): |
no test coverage detected
searching dependent graphs…