|
32 | 32 | lib_minor = vips_lib.vips_version(1) |
33 | 33 | wrap_major = vips_lib.VIPS_MAJOR_VERSION |
34 | 34 | wrap_minor = vips_lib.VIPS_MINOR_VERSION |
35 | | - logger.debug('Module generated for libvips %s.%s' % |
36 | | - (wrap_major, wrap_minor)) |
37 | | - logger.debug('Linked to libvips %s.%s' % (lib_major, lib_minor)) |
| 35 | + logger.debug(f'Module generated for libvips {wrap_major}.{wrap_minor}') |
| 36 | + logger.debug(f'Linked to libvips {lib_major}.{lib_minor}') |
38 | 37 |
|
39 | 38 | if wrap_major != lib_major or wrap_minor != lib_minor: |
40 | 39 | raise Exception('bad wrapper version') |
41 | 40 |
|
42 | 41 | API_mode = True |
43 | 42 |
|
44 | 43 | except Exception as e: |
45 | | - logger.debug('Binary module load failed: %s' % e) |
| 44 | + logger.debug(f'Binary module load failed: {e}') |
46 | 45 | logger.debug('Falling back to ABI mode') |
47 | 46 |
|
48 | 47 | from cffi import FFI |
@@ -141,14 +140,14 @@ class GLogLevelFlags(object): |
141 | 140 | @ffi.def_extern() |
142 | 141 | def _log_handler_callback(domain, level, message, user_data): |
143 | 142 | logger.log(GLogLevelFlags.LEVEL_TO_LOGGER[level], |
144 | | - '{0}: {1}'.format(_to_string(domain), _to_string(message))) |
| 143 | + f'{_to_string(domain)}: {_to_string(message)}') |
145 | 144 |
|
146 | 145 | # keep a ref to the cb to stop it being GCd |
147 | 146 | _log_handler_cb = glib_lib._log_handler_callback |
148 | 147 | else: |
149 | 148 | def _log_handler_callback(domain, level, message, user_data): |
150 | 149 | logger.log(GLogLevelFlags.LEVEL_TO_LOGGER[level], |
151 | | - '{0}: {1}'.format(_to_string(domain), _to_string(message))) |
| 150 | + f'{_to_string(domain)}: {_to_string(message)}') |
152 | 151 |
|
153 | 152 | # keep a ref to the cb to stop it being GCd |
154 | 153 | _log_handler_cb = ffi.callback('GLogFunc', _log_handler_callback) |
|
0 commit comments