@@ -272,12 +272,7 @@ def load_tag_formatter(
272
272
tag_formatter : str | Callable [[str ], str ],
273
273
package_name : str | None = None ,
274
274
) -> Callable :
275
- log .warning (
276
- "Parsing tag_formatter {tag_formatter} with type {type}" .format (
277
- tag_formatter = tag_formatter ,
278
- type = type (tag_formatter ),
279
- )
280
- )
275
+ log .warning (f"Parsing tag_formatter { tag_formatter } with type { type (tag_formatter )} " )
281
276
282
277
if callable (tag_formatter ):
283
278
return tag_formatter
@@ -295,12 +290,7 @@ def formatter(tag):
295
290
if match :
296
291
return match .group ("tag" )
297
292
298
- raise ValueError (
299
- "tag name {name} does not match regexp '{regexp}'" .format (
300
- name = tag ,
301
- regexp = tag_formatter ,
302
- )
303
- )
293
+ raise ValueError (f"Tag name { tag } does not match regexp '{ tag_formatter } '" )
304
294
305
295
return formatter
306
296
except re .error as e :
@@ -336,12 +326,7 @@ def formatter(branch):
336
326
if match :
337
327
return match .group ("branch" )
338
328
339
- raise ValueError (
340
- "Branch name {name} does not match regexp '{regexp}'" .format (
341
- name = branch ,
342
- regexp = branch_formatter ,
343
- )
344
- )
329
+ raise ValueError (f"Branch name { branch } does not match regexp '{ branch_formatter } '" )
345
330
346
331
return formatter
347
332
except re .error as e :
@@ -355,12 +340,7 @@ def get_version_from_callback(
355
340
version_callback : str | Callable [[], str ],
356
341
package_name : str | None = None ,
357
342
) -> str :
358
- log .warning (
359
- "Parsing version_callback {version_callback} with type {type}" .format (
360
- version_callback = version_callback ,
361
- type = type (version_callback ),
362
- )
363
- )
343
+ log .warning (f"Parsing version_callback { version_callback } with type { type (version_callback )} " )
364
344
365
345
if callable (version_callback ):
366
346
return version_callback ()
0 commit comments