ruff: more lint

This commit is contained in:
James R. Barlow
2023-04-14 02:19:19 -07:00
parent 33b70be7d5
commit a3c49b8f31
3 changed files with 11 additions and 2 deletions
+3 -2
View File
@@ -35,6 +35,7 @@ class ExitCodeException(Exception):
message = ""
def __str__(self):
"""Return a string representation of the exception."""
super_msg = super().__str__() # Don't do str(super())
if self.message:
return self.message.format(super_msg)
@@ -94,7 +95,7 @@ class EncryptedPdfError(ExitCodeException):
exit_code = ExitCode.encrypted_pdf
message = dedent(
'''\
"""\
Input PDF is encrypted. The encryption must be removed to
perform OCR.
@@ -103,7 +104,7 @@ class EncryptedPdfError(ExitCodeException):
You can remove the encryption using
qpdf --decrypt [--password=[password]] infilename
'''
"""
)
+6
View File
@@ -1,3 +1,9 @@
# SPDX-FileCopyrightText: 2022 James R. Barlow
#
# SPDX-License-Identifier: MPL-2.0
"""Extra plugins. These are not automatically inserted when ocrmypdf is run.
You can use these plugins by specifying them on the command line, e.g.:
ocrmypdf --plugin ocrmypdf.extra_plugins.semfree ...
"""