imagepypelines/__init__.py
changed.
Showing 1 of 1 files from the diff.
@@ -91,14 +91,25 @@
Loading
91 | 91 | load_plugins() |
|
92 | 92 | ||
93 | 93 | # define a function to check if a plugin is loaded |
|
94 | - | def require(plugin_name): |
|
94 | + | def require(*plugins): |
|
95 | 95 | """check to make sure the given plugin is loaded and raise an error if it |
|
96 | 96 | is not in the imagepypelines namespace |
|
97 | 97 | """ |
|
98 | 98 | import sys |
|
99 | 99 | ||
100 | - | if not plugin_name in LOADED_PLUGINS.keys(): |
|
101 | - | raise RuntimeError('unable to find required plugin "%s"' % plugin_name) |
|
100 | + | master = get_master_logger() |
|
101 | + | ||
102 | + | not_loaded = [] |
|
103 | + | for plg in plugins: |
|
104 | + | if not plg in LOADED_PLUGINS.keys(): |
|
105 | + | not_loaded.append(plg) |
|
106 | + | ||
107 | + | if not_loaded: |
|
108 | + | for plg in not_loaded: |
|
109 | + | master.error(f'unable to find "{plg}"') |
|
110 | + | raise RuntimeError(f"unable to find required plugin(s) {not_loaded}") |
|
111 | + | ||
112 | + | ||
102 | 113 | ||
103 | 114 | ||
104 | 115 | def get_plugin_by_name(plugin_name): |
Files | Coverage |
---|---|
imagepypelines | 0.00% |
Project Totals (15 files) | 0.00% |
1127.3
TRAVIS_PYTHON_VERSION=3.8 TRAVIS_OS_NAME=linux
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.