|
4 | 4 | import xml.etree.ElementTree as ET
|
5 | 5 |
|
6 | 6 | from pyvips import ffi, enum_dict, flags_dict, \
|
7 |
| - vips_lib, type_map, type_name, type_from_name |
| 7 | + type_map, type_name, type_from_name |
8 | 8 |
|
9 | 9 | # This file generates enums.py -- the set of classes giving the permissible
|
10 | 10 | # values for the pyvips enums/flags. Run with something like:
|
@@ -103,10 +103,6 @@ def add_nickname(gtype, a, b):
|
103 | 103 |
|
104 | 104 | type_map(type_from_name('GEnum'), add_nickname)
|
105 | 105 |
|
106 |
| - # Filter internal enums |
107 |
| - blacklist = ['VipsImageType', 'VipsToken'] |
108 |
| - all_nicknames = [name for name in all_nicknames if name not in blacklist] |
109 |
| - |
110 | 106 | for name in all_nicknames:
|
111 | 107 | gtype = type_from_name(name)
|
112 | 108 | python_name = remove_prefix(name)
|
@@ -198,11 +194,6 @@ def add_nickname(gtype, a, b):
|
198 | 194 |
|
199 | 195 |
|
200 | 196 | if __name__ == "__main__":
|
201 |
| - # otherwise we're missing some enums |
202 |
| - vips_lib.vips_token_get_type() |
203 |
| - vips_lib.vips_saveable_get_type() |
204 |
| - vips_lib.vips_image_type_get_type() |
205 |
| - |
206 | 197 | print('# libvips enums -- this file is generated automatically')
|
207 | 198 | print('# flake8: noqa: E501') # ignore line too long error
|
208 | 199 | generate_enums()
|
|
0 commit comments