mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2025-06-26 23:49:59 +00:00
ruff: more lint
This commit is contained in:
parent
33b70be7d5
commit
a3c49b8f31
@ -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
|
||||
'''
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
|
@ -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 ...
|
||||
"""
|
||||
|
@ -1,4 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2022 James R. Barlow
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
"""Tests."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
Loading…
x
Reference in New Issue
Block a user