diff --git a/docs/conf.py b/docs/conf.py index ee636db6..a90813cf 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,6 +2,8 @@ # SPDX-FileCopyrightText: 2022 James R. Barlow # SPDX-License-Identifier: CC-BY-SA-4.0 +# ruff: noqa: E402 + # ocrmypdf documentation build configuration file, created by # sphinx-quickstart on Sun Sep 4 14:29:43 2016. # @@ -78,7 +80,6 @@ author = 'James R. Barlow' import os from importlib.metadata import version as package_version - on_rtd = os.environ.get('READTHEDOCS') == 'True' if on_rtd: diff --git a/pyproject.toml b/pyproject.toml index dda01034..4ee6f0fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -188,3 +188,10 @@ ignore_missing_imports = true good-names = ["i", "j", "k", "ex", "Run", "_", "e", "p", "im", "w", "h", "m", "x", "y", "a", "b", "fp", "n", "f", "s", "v", "q", "dx", "dy"] logging-format-style = "old" disable = ["raw-checker-failed", "bad-inline-option", "locally-disabled", "file-ignored", "suppressed-message", "useless-suppression", "deprecated-pragma", "use-symbolic-message-instead", "logging-fstring-interpolation", "missing-function-docstring", "too-few-public-methods"] + +[tool.ruff] +src = ["src"] +select = ["E"] + +[tool.ruff.pydocstyle] +convention = "google" \ No newline at end of file diff --git a/src/ocrmypdf/_exec/tesseract.py b/src/ocrmypdf/_exec/tesseract.py index db4b209e..99a0715a 100644 --- a/src/ocrmypdf/_exec/tesseract.py +++ b/src/ocrmypdf/_exec/tesseract.py @@ -34,10 +34,12 @@ HOCR_TEMPLATE = """