diff --git a/pyproject.toml b/pyproject.toml index cd214837c..e2dabafd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -269,6 +269,9 @@ extend-select = [ "Q", # https://docs.astral.sh/ruff/rules/#flake8-quotes-q "RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse "RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf + "S102", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s + "S110", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s + "S112", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s "SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim "T100", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10 "T20", # https://docs.astral.sh/ruff/rules/#flake8-print-t20 diff --git a/src/documents/consumer.py b/src/documents/consumer.py index 5f288bd09..e6e4e77ad 100644 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -961,7 +961,7 @@ class ConsumerPlugin( try: copy_basic_file_stats(source, target) except Exception: # pragma: no cover - pass + self.log.debug("Unable to copy file stats from %s to %s", source, target) class ConsumerPreflightPlugin( diff --git a/src/documents/signals/handlers.py b/src/documents/signals/handlers.py index d6359066b..2296cf5c7 100644 --- a/src/documents/signals/handlers.py +++ b/src/documents/signals/handlers.py @@ -636,7 +636,7 @@ def update_filename_and_move_files( # so this is not the end of the world. # B: if moving the original file failed, nothing has changed # anyway. - pass + logger.exception("Error reverting document changes") # restore old values on the instance instance.filename = old_filename diff --git a/src/documents/views.py b/src/documents/views.py index 18f11522e..07a46609a 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -1440,7 +1440,7 @@ class DocumentViewSet( try: lang = detect(doc.content) except Exception: - pass + logger.debug("Unable to detect language for document %s", doc.pk) meta["lang"] = lang return Response(meta)