Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit fea5970

Browse files
committed
Fix B907
is manually surrounded by quotes, consider using the conversion flag
1 parent 0725937 commit fea5970

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

camelot/backends/image_conversion.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(self, backend="poppler", use_fallback=True):
2626
[description]
2727
"""
2828
if backend not in BACKENDS.keys():
29-
raise ValueError(f"Image conversion backend '{backend}' not supported")
29+
raise ValueError(f"Image conversion backend {backend!r} not supported")
3030

3131
self.backend = backend
3232
self.use_fallback = use_fallback
@@ -62,12 +62,12 @@ def convert(self, pdf_path, png_path):
6262
converter.convert(pdf_path, png_path)
6363
except Exception as e:
6464
raise type(e)(
65-
str(e) + f" with image conversion backend '{fallback}'"
65+
str(e) + f" with image conversion backend {fallback!r}"
6666
).with_traceback(sys.exc_info()[2])
6767
continue
6868
else:
6969
break
7070
else:
7171
raise type(e)(
72-
str(e) + f" with image conversion backend '{self.backend}'"
72+
str(e) + f" with image conversion backend {self.backend!r}"
7373
).with_traceback(sys.exc_info()[2])

0 commit comments

Comments
 (0)