AI Slop Code RIsk Monitor

paperless-ngx/paperless-ngx

A community-supported supercharged document management system: scan, index and archive all your documents

14.4 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for paperless-ngx/paperless-ngx, a Python project with 46,483 GitHub stars. SynthScan examined 266,669 lines of code across 1113 source files, recording 3317 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 14.4 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

14.4
Adjusted Signal
14.4
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
46.5K
Stars
Python
Language
266.7K
Lines of Code
1.1K
Files
3.3K
Pattern Hits
2026-10-12
Scan Date
0.05
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 37.6/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 2716 finding(s).

Hallucinated Dependency & Supply Chain Risk 5.7/100 · LOW

Are imports declared and package/API names verified? 208 finding(s).

Agent Over-Engineering Ratio 45.7/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 2928 finding(s).

PR Review Velocity Impact 53.9/100 · HIGH

Which changes need focused human review? 3317 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 11HIGH 41MEDIUM 257LOW 3008

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 3317 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers2530 hits · 2229 pts
SeverityFileLineSnippetContext
LOWsrc-ui/src/app/utils/query-params.ts60export function transformLegacyFilterRules(CODE
LOWsrc-ui/src/app/utils/query-params.ts103export function filterRulesFromQueryParams(CODE
LOWsrc-ui/src/app/utils/query-params.ts151export function queryParamsFromFilterRules(filterRules: FilterRule[]): Params {CODE
LOWsrc-ui/src/app/utils/http.ts1export function getFilenameFromContentDisposition(header: string): string {CODE
LOWsrc-ui/src/app/utils/color.ts122export function estimateBrightnessForColor(colorHex: string) {CODE
LOWsrc/conftest.py48def _clear_content_type_caches() -> None:CODE
LOWsrc/paperless_ai/embedding.py107def get_configured_model_name(config: AIConfig) -> str:CODE
LOWsrc/paperless_ai/embedding.py120def _normalize_llm_index_text(text: str) -> str:CODE
LOWsrc/paperless_ai/vector_store.py390 def _delete_chunks_by_document_id(self, document_id: int) -> None:CODE
LOWsrc/paperless_ai/vector_store.py742 def _run_structural_migration(self, migration: Migration) -> None:CODE
LOWsrc/paperless_ai/base_model.py210def model_to_classification_suggestions(CODE
LOWsrc/paperless_ai/base_model.py276def classification_suggestions_to_model(CODE
LOWsrc/paperless_ai/matching.py49def resolve_correspondent_ids(CODE
LOWsrc/paperless_ai/matching.py56def resolve_document_type_ids(ids: list[int], user: User | None) -> list[DocumentType]:CODE
LOW⚡src/paperless_ai/matching.py82def match_correspondents_by_name(CODE
LOW⚡src/paperless_ai/matching.py89def match_document_types_by_name(CODE
LOW⚡src/paperless_ai/matching.py96def match_storage_paths_by_name(CODE
LOWsrc/paperless_ai/chat.py39def _build_document_reference(CODE
LOWsrc/paperless_ai/chat.py89def _format_chat_metadata_trailer(references: list[dict[str, int | str]]) -> str:CODE
LOWsrc/paperless_ai/chat.py96def stream_chat_with_documents(CODE
LOWsrc/paperless_ai/chat.py115def _stream_chat_with_documents(CODE
LOWsrc/paperless_ai/taxonomy.py46def empty_taxonomy_candidates() -> TaxonomyCandidates:CODE
LOWsrc/paperless_ai/taxonomy.py83def _visible_ranked_candidates(CODE
LOWsrc/paperless_ai/taxonomy.py115def build_taxonomy_candidates(CODE
LOWsrc/paperless_ai/taxonomy.py196def format_taxonomy_for_prompt(CODE
LOWsrc/paperless_ai/indexing.py44def queue_llm_index_update_if_needed(*, rebuild: bool, reason: str) -> bool:CODE
LOWsrc/paperless_ai/indexing.py219def _check_and_run_migrations(CODE
LOWsrc/paperless_ai/indexing.py382def _exclude_document_id_filter(document_id: int | str):CODE
LOWsrc/paperless_ai/indexing.py399def exclude_document_ids_filter(doc_ids):CODE
LOWsrc/paperless_ai/indexing.py512def llm_index_add_or_update_document(document: Document):CODE
LOWsrc/paperless_ai/indexing.py579def llm_index_remove_document(document: Document):CODE
LOWsrc/paperless_ai/ai_classifier.py43def _fulltext_similar_documents(CODE
LOWsrc/paperless_ai/ai_classifier.py161def build_localization_prompt(CODE
LOWsrc/paperless_ai/ai_classifier.py291def get_ai_document_classification(CODE
LOWsrc/paperless_ai/tests/test_lazy_imports.py9 def test_importing_tasks_does_not_load_ai_libraries(self) -> None:CODE
LOWsrc/paperless_ai/tests/test_tables.py25 def test_create_is_idempotent(self, conn: sqlite3.Connection) -> None:CODE
LOWsrc/paperless_ai/tests/test_tables.py39 def test_insert_many_then_lookup_by_document_id(CODE
LOWsrc/paperless_ai/tests/test_tables.py63 def test_delete_for_document_removes_only_that_document(CODE
LOWsrc/paperless_ai/tests/test_tables.py84 def test_delete_all_clears_every_row(self, conn: sqlite3.Connection) -> None:CODE
LOWsrc/paperless_ai/tests/test_tables.py101 def test_count_reflects_live_rows(self, conn: sqlite3.Connection) -> None:CODE
LOWsrc/paperless_ai/tests/test_tables.py121 def test_upsert_many_then_all_modified_times(CODE
LOWsrc/paperless_ai/tests/test_tables.py146 def test_upsert_many_overwrites_existing_value(CODE
LOWsrc/paperless_ai/tests/test_tables.py164 def test_delete_for_document_removes_only_that_row(CODE
LOWsrc/paperless_ai/tests/test_tables.py184 def test_delete_all_clears_every_row(self, conn: sqlite3.Connection) -> None:CODE
LOWsrc/paperless_ai/tests/test_tables.py201 def test_copy_all_streams_every_row_to_destination(CODE
LOWsrc/paperless_ai/tests/test_tables.py241 def test_typed_accessor_roundtrip(CODE
LOWsrc/paperless_ai/tests/test_tables.py263 def test_total_inserts_starts_at_zero(self, conn: sqlite3.Connection) -> None:CODE
LOWsrc/paperless_ai/tests/test_tables.py275 def test_increment_total_inserts_accumulates(CODE
LOWsrc/paperless_ai/tests/test_tables.py292 def test_increment_total_inserts_is_a_single_statement(CODE
LOWsrc/paperless_ai/tests/test_tables.py325 def test_reset_total_inserts_sets_absolute_value(CODE
LOWsrc/paperless_ai/tests/test_prompts.py14 def test_renders_taxonomy_block_empty_when_candidates_empty(self) -> None:CODE
LOWsrc/paperless_ai/tests/test_prompts.py57 def test_render_prompt_resolves_every_prompt_name(CODE
LOWsrc/paperless_ai/tests/test_embedding.py64def test_get_embedding_model_openai(mock_ai_config):CODE
LOWsrc/paperless_ai/tests/test_embedding.py86def test_get_embedding_model_openai_falls_back_to_llm_api_key(mock_ai_config):CODE
LOWsrc/paperless_ai/tests/test_embedding.py101def test_get_embedding_model_openai_without_api_key_sends_placeholder(CODE
LOWsrc/paperless_ai/tests/test_embedding.py120def test_get_embedding_model_openai_prefers_embedding_endpoint(mock_ai_config):CODE
LOWsrc/paperless_ai/tests/test_embedding.py142def test_get_embedding_model_openai_blocks_internal_endpoint_when_disallowed(CODE
LOWsrc/paperless_ai/tests/test_embedding.py155def test_get_embedding_model_huggingface(mock_ai_config):CODE
LOWsrc/paperless_ai/tests/test_embedding.py172def test_get_embedding_model_ollama(mock_ai_config):CODE
LOWsrc/paperless_ai/tests/test_embedding.py189def test_get_embedding_model_ollama_prefers_embedding_endpoint(mock_ai_config):CODE
2470 more matches not shown…
Decorative Section Separators216 hits · 726 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/ci-release.yml193 # ---------------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/ci-release.yml195 # ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/celery.py13# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/celery.py19# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/mail.py446 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/mail.py448 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py94 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py96 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py136 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py138 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py164 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py166 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py190 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py192 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py282 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py284 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py317 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/mail.py319 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/tesseract.py96 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/tesseract.py98 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/tesseract.py108 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/tesseract.py110 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/tesseract.py135 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/tesseract.py137 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/tesseract.py142 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/tesseract.py144 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tesseract.py77 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tesseract.py79 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tesseract.py155 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tesseract.py157 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py90 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py92 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py137 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py139 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py164 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py166 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py205 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py207 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py278 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py280 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py313 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/tika.py315 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/tika.py394 # ------------------------------------------------------------------COMMENT
MEDIUM⚡src/paperless/parsers/tika.py396 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py119 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py121 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py174 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py176 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py205 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py207 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py230 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py232 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py284 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py286 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py306 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py308 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py395 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/remote.py397 # ------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/registry.py47# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/paperless/parsers/registry.py49# ---------------------------------------------------------------------------COMMENT
156 more matches not shown…
Unused Imports157 hits · 147 pts
SeverityFileLineSnippetContext
LOWsrc-ui/e2e/backend.py5CODE
LOWsrc/conftest.py8CODE
LOWsrc/paperless_testing/dirs.py8CODE
LOWsrc/paperless_testing/typed_factory.py5CODE
LOWsrc/paperless_testing/factories.py5CODE
LOWsrc/paperless_testing/assertions.py3CODE
LOWsrc/paperless_testing/retry.py1CODE
LOWsrc/paperless_testing/http.py1CODE
LOWsrc/paperless_testing/migrations.py1CODE
LOWsrc/paperless_testing/permissions.py8CODE
LOWsrc/paperless_testing/fakes/progress.py1CODE
LOWsrc/paperless_ai/db.py1CODE
LOWsrc/paperless_ai/embedding.py7CODE
LOWsrc/paperless_ai/vector_store.py756CODE
LOWsrc/paperless_ai/taxonomy.py21CODE
LOWsrc/paperless_ai/indexing.py27CODE
LOWsrc/paperless_ai/indexing.py28CODE
LOWsrc/paperless_ai/tests/test_chat.py1CODE
LOWsrc/paperless_ai/tests/test_ai_classifier.py33CODE
LOWsrc/paperless/logging.py1CODE
LOWsrc/paperless/signed_pickle.py1CODE
LOWsrc/paperless/consumers.py1CODE
LOWsrc/paperless/__init__.py1CODE
LOWsrc/paperless/__init__.py2CODE
LOWsrc/paperless/__init__.py3CODE
LOWsrc/paperless/__init__.py4CODE
LOWsrc/paperless/__init__.py5CODE
LOWsrc/paperless/parsers/mail.py14CODE
LOWsrc/paperless/parsers/tesseract.py1CODE
LOWsrc/paperless/parsers/tika.py10CODE
LOWsrc/paperless/parsers/remote.py15CODE
LOWsrc/paperless/parsers/registry.py33CODE
LOWsrc/paperless/parsers/__init__.py36CODE
LOWsrc/paperless/parsers/utils.py9CODE
LOWsrc/paperless/parsers/text.py9CODE
LOWsrc/paperless/tests/test_registry.py10CODE
LOWsrc/paperless/tests/conftest.py11CODE
LOWsrc/paperless/tests/test_checks_v3.py3CODE
LOWsrc/paperless/tests/test_ocr_config.py3CODE
LOWsrc/paperless/tests/test_parser_utils.py3CODE
LOWsrc/paperless/tests/test_remote_ocr_config.py3CODE
LOWsrc/paperless/tests/parsers/conftest.py7CODE
LOWsrc/paperless/tests/parsers/test_remote_parser.py16CODE
LOWsrc/paperless/tests/parsers/test_text_parser.py8CODE
LOWsrc/paperless/tests/parsers/test_tesseract_parser.py9CODE
LOW…/paperless/tests/parsers/test_convert_image_to_pdfa.py12CODE
LOWsrc/paperless/tests/parsers/test_parse_modes.py12CODE
LOWsrc/paperless_mail/tests/factories.py1CODE
LOWsrc/documents/mail.py1CODE
LOWsrc/documents/classifier.py1CODE
LOWsrc/documents/__init__.py2CODE
LOWsrc/documents/parsers.py1CODE
LOWsrc/documents/apps.py36CODE
LOWsrc/documents/bulk_download.py1CODE
LOWsrc/documents/caching.py1CODE
LOWsrc/documents/consumer.py191CODE
LOWsrc/documents/utils.py19CODE
LOWsrc/documents/utils.py20CODE
LOWsrc/documents/barcodes.py1CODE
LOWsrc/documents/serialisers.py1CODE
97 more matches not shown…
Excessive Try-Catch Wrapping130 hits · 128 pts
SeverityFileLineSnippetContext
LOWdocker/rootfs/usr/local/bin/wait-for-redis.py44 except Exception as e:CODE
LOWdocs/development.md569 except Exception as e:CODE
LOWsrc/paperless_testing/retry.py59 except Exception as e: # pragma: no coverCODE
LOWsrc/paperless_ai/client.py183 except Exception as exc:CODE
MEDIUMsrc/paperless_ai/client.py178def _normalize_errors(self) -> Iterator[None]:CODE
LOWsrc/paperless_ai/chat.py110 except Exception as e:CODE
LOWsrc/paperless_ai/ai_classifier.py241 except Exception:CODE
LOWsrc/paperless/utils.py151 except Exception:CODE
LOWsrc/paperless/utils.py160 except Exception as e:CODE
LOWsrc/paperless/parsers/mail.py492 except Exception as err:CODE
LOWsrc/paperless/parsers/mail.py529 except Exception as err:CODE
LOWsrc/paperless/parsers/mail.py602 except Exception as err:CODE
LOWsrc/paperless/parsers/mail.py730 except Exception as err:CODE
LOWsrc/paperless/parsers/mail.py828 except Exception as err:CODE
LOWsrc/paperless/parsers/tesseract.py218 except Exception as e:CODE
LOWsrc/paperless/parsers/tesseract.py231 except Exception as e:CODE
LOWsrc/paperless/parsers/tesseract.py362 except Exception as e:CODE
LOWsrc/paperless/parsers/tesseract.py409 except Exception as e:CODE
LOWsrc/paperless/parsers/tesseract.py432 except Exception as e:CODE
LOWsrc/paperless/parsers/tesseract.py552 except Exception as e:CODE
LOWsrc/paperless/parsers/tesseract.py565 except Exception as e:CODE
LOWsrc/paperless/parsers/tesseract.py650 except Exception as e:CODE
LOWsrc/paperless/parsers/tesseract.py653 except Exception as e:CODE
LOWsrc/paperless/parsers/tika.py262 except Exception as err:CODE
LOW⚡src/paperless/parsers/tika.py386 except Exception as e:CODE
LOWsrc/paperless/parsers/tika.py452 except Exception as err:CODE
LOWsrc/paperless/parsers/remote.py507 except Exception as e:CODE
LOWsrc/paperless/parsers/registry.py239 except Exception:CODE
LOWsrc/paperless/parsers/utils.py63 except Exception:CODE
LOWsrc/paperless/parsers/utils.py106 except Exception:CODE
LOWsrc/paperless/parsers/utils.py263 except Exception as e:CODE
LOWsrc/paperless/parsers/utils.py303 except Exception as e:CODE
LOWsrc/paperless/parsers/utils.py335 except Exception as e:CODE
LOWsrc/paperless_mail/mail.py243 except Exception as e:CODE
LOWsrc/paperless_mail/mail.py308 except Exception:CODE
LOWsrc/paperless_mail/mail.py594 except Exception as e:CODE
LOWsrc/paperless_mail/mail.py643 except Exception as e:CODE
LOWsrc/paperless_mail/mail.py733 except Exception as e:CODE
LOWsrc/paperless_mail/mail.py739 except Exception as e:CODE
LOWsrc/paperless_mail/mail.py775 except Exception as e:CODE
LOWsrc/paperless_mail/mail.py798 except Exception as err:CODE
LOWsrc/paperless_mail/mail.py834 except Exception as err:CODE
LOWsrc/paperless_mail/mail.py884 except Exception as e:CODE
LOWsrc/documents/classifier.py189 except Exception as e: # pragma: no coverCODE
LOWsrc/documents/classifier.py286 except Exception as err:CODE
LOWsrc/documents/tasks.py267 except Exception as e:CODE
LOWsrc/documents/tasks.py366 except Exception as e:CODE
LOWsrc/documents/tasks.py511 except Exception:CODE
LOWsrc/documents/tasks.py545 except Exception as e: # pragma: no coverCODE
LOWsrc/documents/tasks.py880 except Exception as exc:CODE
LOWsrc/documents/tasks.py918 except Exception as exc:CODE
LOWsrc/documents/validators.py43 except Exception as e:CODE
LOWsrc/documents/parsers.py119 except Exception as e: # pragma: no coverCODE
LOWsrc/documents/consumer.py327 except Exception as e:CODE
LOWsrc/documents/consumer.py396 except Exception as e:CODE
LOWsrc/documents/consumer.py456 except Exception as e:CODE
LOWsrc/documents/consumer.py582 except Exception as e:CODE
LOWsrc/documents/consumer.py796 except Exception as e:CODE
LOWsrc/documents/consumer.py886 except Exception as e:CODE
LOWsrc/documents/consumer.py993 except Exception as e:CODE
70 more matches not shown…
Hallucination Indicators11 hits · 110 pts
SeverityFileLineSnippetContext
CRITICALsrc-ui/src/app/services/document-list-view.service.ts291 if (!this.router.routerState.snapshot.url.includes('/view/')) {CODE
CRITICALsrc-ui/src/app/services/document-list-view.service.ts356 replaceUrl: !this.router.routerState.snapshot.url.includes('?'), // in case navigating from params-less /dCODE
CRITICALsrc/paperless/validators.py4from django.core.exceptions import ValidationErrorCODE
CRITICALsrc/paperless_mail/tests/test_mail.py1431 self.mailMocker.bogus_mailbox.folder.list.assert_called_once()CODE
CRITICALsrc/paperless_mail/tests/test_mail.py1464 self.mailMocker.bogus_mailbox.folder.list.assert_called_once()CODE
CRITICALsrc/documents/models.py10from django.core.exceptions import ValidationErrorCODE
CRITICALsrc/documents/validators.py3from django.core.exceptions import ValidationErrorCODE
CRITICALsrc/documents/serialisers.py19from django.core.exceptions import ValidationErrorCODE
CRITICALsrc/documents/views.py375 ) and self.request.user.ui_settings.settings.get("language"):CODE
CRITICALsrc/documents/views.py376 lang = self.request.user.ui_settings.settings.get("language")CODE
CRITICALsrc/documents/tests/test_bulk_edit.py913 mock_consume_file.return_value.set.return_value.apply_async.assert_called_once()CODE
Empty Error Handlers20 hits · 100 pts
SeverityFileLineSnippetContext
HIGHsrc/paperless/auth.py31except User.DoesNotExist:CODE
HIGHsrc/paperless/checks.py54except (PermissionError, OSError):CODE
HIGHsrc/paperless_mail/tests/test_preprocessor.py56except (FileNotFoundError, subprocess.TimeoutExpired):CODE
HIGHsrc/paperless_mail/tests/test_preprocessor.py198except (FileNotFoundError, subprocess.TimeoutExpired):CODE
HIGHsrc/documents/tasks.py902except OSError:CODE
HIGHsrc/documents/tasks.py896except OSError:CODE
HIGHsrc/documents/models.py1233except OSError:CODE
HIGHsrc/documents/consumer.py1013except Exception: # pragma: no coverCODE
HIGHsrc/documents/utils.py91except PermissionError:CODE
HIGHsrc/documents/serialisers.py312except KeyError:CODE
HIGHsrc/documents/serialisers.py2625except KeyError:CODE
HIGHsrc/documents/bulk_edit.py1076except pikepdf.PasswordError:CODE
HIGHsrc/documents/filters.py337except StopIteration:CODE
HIGHsrc/documents/filters.py1042except (TypeError, ValueError):CODE
HIGHsrc/documents/views.py1538except Exception:CODE
HIGHsrc/documents/signals/handlers.py1145except ValueError:CODE
HIGHsrc/documents/signals/handlers.py636except Exception:CODE
HIGHsrc/documents/tests/test_management_importer.py423except CommandError:CODE
HIGHsrc/documents/tests/search/test_backend.py63except RuntimeError:CODE
HIGHsrc/documents/templating/filepath.py409except UndefinedError:CODE
Self-Referential Comments28 hits · 82 pts
SeverityFileLineSnippetContext
MEDIUMdocker/compose/docker-compose.sqlite.yml2# This file contains everything paperless needs to run.COMMENT
MEDIUMdocker/compose/docker-compose.mariadb.yml2# This file contains everything paperless needs to run.COMMENT
MEDIUMdocker/compose/docker-compose.postgres-tika.yml2# This file contains everything paperless needs to run.COMMENT
MEDIUMdocker/compose/docker-compose.postgres.yml2# This file contains everything paperless needs to run.COMMENT
MEDIUMdocker/compose/docker-compose.sqlite-tika.yml2# This file contains everything paperless needs to run.COMMENT
MEDIUMdocker/compose/docker-compose.mariadb-tika.yml2# This file contains everything paperless needs to run.COMMENT
MEDIUMdocker/compose/docker-compose.portainer.yml2# This file contains everything paperless needs to run.COMMENT
MEDIUM…vcontainer/docker-compose.devcontainer.sqlite-tika.yml2# This file contains everything Paperless NGX needs to run.COMMENT
MEDIUM…vcontainer/docker-compose.devcontainer.sqlite-tika.yml21# This file is intended only to be used through VSCOde devcontainers. See README.mdCOMMENT
MEDIUMsrc/paperless/auth.py36 """This class is here to provide authentication to the angular dev serverSTRING
MEDIUMsrc/paperless/tests/test_registry.py171 # Create a subclass and delete the specified method to break compliance.COMMENT
MEDIUM…c/paperless/tests/settings/test_environment_parsers.py102 # Create a dummy file to resolve againstCOMMENT
MEDIUMsrc/documents/consumer.py651 # Create a log entry for the version addition, if enabledCOMMENT
MEDIUMsrc/documents/barcodes.py213 # Create the split document tasksCOMMENT
MEDIUMsrc/documents/barcodes.py235 # This file is now two or more filesCOMMENT
MEDIUMsrc/documents/barcodes.py298 # This file is really borked, allow the consumption to continueCOMMENT
MEDIUMsrc/documents/bulk_edit.py955 # Create a new version from the edited PDF rather than replacing in-placeCOMMENT
MEDIUMsrc/documents/bulk_edit.py1089 # Create a new version rather than modifying the root/original in place.COMMENT
MEDIUMsrc/documents/bulk_edit.py1175 # Create an instance if target doc doesn't have this field or append it to an existing oneCOMMENT
MEDIUMsrc/documents/tests/test_workflows.py5028 # Create a test file to be consumedCOMMENT
MEDIUMsrc/documents/tests/test_workflows.py5036 # Create a ConsumableDocumentCOMMENT
MEDIUMsrc/documents/tests/test_workflows.py5092 # Create a test file to be consumedCOMMENT
MEDIUMsrc/documents/tests/test_workflows.py5100 # Create a ConsumableDocumentCOMMENT
MEDIUMsrc/documents/tests/test_api_app_config.py850 # Define a custom namespace "my:hack" and try to use itCOMMENT
MEDIUMsrc/documents/tests/test_management_importer.py382 # Create the zip fileCOMMENT
MEDIUMsrc/documents/tests/test_file_handling.py381 # Create an identical document and ensure it is trashed under a new nameCOMMENT
MEDIUMsrc/documents/management/commands/document_importer.py461 # Create a temporary directory for extracting a zip file into it, even if supplied source is no zip file to keepCOMMENT
MEDIUMsrc/documents/templating/filepath.py364 # Create the dummy document object with all fields filled in for validation purposesCOMMENT
Deep Nesting80 hits · 65 pts
SeverityFileLineSnippetContext
LOWdocker/rootfs/usr/local/bin/deduplicate.py52CODE
LOWsrc/paperless_ai/vector_store.py109CODE
LOWsrc/paperless_ai/indexing.py416CODE
LOWsrc/paperless/validators.py183CODE
LOWsrc/paperless/checks.py25CODE
LOWsrc/paperless/utils.py118CODE
LOWsrc/paperless/serialisers.py265CODE
LOWsrc/paperless/settings/parsers.py61CODE
LOWsrc/paperless/parsers/tesseract.py265CODE
LOWsrc/paperless/parsers/tika.py398CODE
LOWsrc/paperless_mail/mail.py389CODE
LOWsrc/paperless_mail/mail.py649CODE
LOWsrc/paperless_mail/mail.py677CODE
LOWsrc/paperless_mail/views.py98CODE
LOWsrc/paperless_mail/tests/test_mail.py104CODE
LOWsrc/paperless_mail/tests/helpers.py51CODE
LOWsrc/paperless_mail/tests/helpers.py162CODE
LOWsrc/documents/mail.py19CODE
LOWsrc/documents/tasks.py186CODE
LOWsrc/documents/tasks.py372CODE
LOWsrc/documents/tasks.py555CODE
LOWsrc/documents/double_sided.py39CODE
LOWsrc/documents/matching.py165CODE
LOWsrc/documents/matching.py637CODE
LOWsrc/documents/consumer.py404CODE
LOWsrc/documents/sanity_checker.py240CODE
LOWsrc/documents/permissions.py104CODE
LOWsrc/documents/barcodes.py341CODE
LOWsrc/documents/serialisers.py239CODE
LOWsrc/documents/serialisers.py907CODE
LOWsrc/documents/serialisers.py1207CODE
LOWsrc/documents/serialisers.py1551CODE
LOWsrc/documents/serialisers.py1955CODE
LOWsrc/documents/serialisers.py2219CODE
LOWsrc/documents/serialisers.py3065CODE
LOWsrc/documents/bulk_edit.py477CODE
LOWsrc/documents/bulk_edit.py766CODE
LOWsrc/documents/bulk_edit.py898CODE
LOWsrc/documents/bulk_edit.py1037CODE
LOWsrc/documents/bulk_edit.py1149CODE
LOWsrc/documents/filters.py250CODE
LOWsrc/documents/filters.py471CODE
LOWsrc/documents/filters.py637CODE
LOWsrc/documents/views.py1862CODE
LOWsrc/documents/signals/handlers.py345CODE
LOWsrc/documents/signals/handlers.py440CODE
LOWsrc/documents/signals/handlers.py757CODE
LOWsrc/documents/signals/handlers.py862CODE
LOWsrc/documents/signals/handlers.py1080CODE
LOWsrc/documents/tests/test_bulk_edit.py1644CODE
LOWsrc/documents/tests/test_management_exporter.py199CODE
LOWsrc/documents/tests/test_consumer.py144CODE
LOWsrc/documents/tests/test_consumer.py1402CODE
LOWsrc/documents/tests/test_consumer.py1557CODE
LOWsrc/documents/tests/test_api_bulk_edit.py1986CODE
LOW…c/documents/tests/search/test_unicode_normalization.py136CODE
LOWsrc/documents/tests/export/test_sinks.py365CODE
LOWsrc/documents/management/commands/document_retagger.py230CODE
LOWsrc/documents/management/commands/document_importer.py74CODE
LOWsrc/documents/management/commands/document_importer.py218CODE
20 more matches not shown…
Cross-File Repetition10 hits · 50 pts
SeverityFileLineSnippetContext
HIGHsrc/paperless/parsers/mail.py0return the mime types this parser handles. returns ------- dict[str, str] mapping of mime type to preferred file extensiSTRING
HIGHsrc/paperless/parsers/tika.py0return the mime types this parser handles. returns ------- dict[str, str] mapping of mime type to preferred file extensiSTRING
HIGHsrc/paperless/parsers/text.py0return the mime types this parser handles. returns ------- dict[str, str] mapping of mime type to preferred file extensiSTRING
HIGHsrc/paperless/parsers/mail.py0return the plain-text content extracted during parse. returns ------- str extracted text, or an empty string if no text STRING
HIGHsrc/paperless/parsers/tika.py0return the plain-text content extracted during parse. returns ------- str extracted text, or an empty string if no text STRING
HIGHsrc/paperless/parsers/__init__.py0return the plain-text content extracted during parse. returns ------- str extracted text, or an empty string if no text STRING
HIGHsrc/paperless/parsers/text.py0return the plain-text content extracted during parse. returns ------- str extracted text, or an empty string if no text STRING
HIGHsrc/paperless/tests/test_ocr_config.py0mock applicationconfiguration with all fields none → falls back to django settings.STRING
HIGHsrc/paperless/tests/test_remote_ocr_config.py0mock applicationconfiguration with all fields none → falls back to django settings.STRING
HIGHsrc/documents/tests/test_consumer_archive.py0mock applicationconfiguration with all fields none → falls back to django settings.STRING
Fake / Example Data36 hits · 36 pts
SeverityFileLineSnippetContext
LOWdocs/changelog.md8719 thinking that everything is in Catalan because we had _Lorem ipsum_CODE
LOWdocs/development.md421 author = "Acme Corp" # author / organisationCODE
LOWdocs/development.md693 author = "Acme Corp"CODE
LOWsrc-ui/src/app/components/chat/chat/chat.component.html38 [placeholder]="placeholder"CODE
LOW…il/document-history/document-history.component.spec.ts76 const correspondentName = 'John Doe'CODE
LOW…il/document-history/document-history.component.spec.ts92 .mockReturnValue(of({ name: 'John Doe' }))CODE
LOW…file-edit-dialog/profile-edit-dialog.component.spec.ts28 email: 'foo@bar.com',CODE
LOW…c/app/components/common/input/date/date.component.html13 <input #inputField class="form-control" [class.is-invalid]="error" [placeholder]="placeholder" [id]="inputId" CODE
LOW…ommon/input/document-link/document-link.component.html30 [placeholder]="placeholder"CODE
LOW…mponents/common/input/textarea/textarea.component.html23 [placeholder]="placeholder"CODE
LOW…c/app/components/common/input/text/text.component.html14 <input #inputField type="text" class="form-control" [class.is-invalid]="error" [id]="inputId" [(ngModel)]="valueCODE
LOW…p/components/common/input/select/select.component.html27 [placeholder]="placeholder"CODE
LOW…stions-dropdown/suggestions-dropdown.component.spec.ts27 suggested_correspondents: ['John Doe'],CODE
LOW…s/common/preview-popup/preview-popup.component.spec.ts21 content: 'Cupcake ipsum dolor sit amet ice cream.',CODE
LOW…ument-card-large/document-card-large.component.spec.ts37 'Cupcake ipsum dolor sit amet ice cream. Donut shortbread cheesecake caramels tiramisu pastry caramels chocolate barCODE
LOW…ument-card-small/document-card-small.component.spec.ts26 'Cupcake ipsum dolor sit amet ice cream. Donut shortbread cheesecake caramels tiramisu pastry caramels chocolate barCODE
LOWsrc-ui/src/app/services/profile.service.spec.ts42 service.update({ email: 'foo@bar.com' }).subscribe()CODE
LOWsrc-ui/src/app/services/profile.service.spec.ts48 email: 'foo@bar.com',CODE
LOWsrc/paperless_ai/tests/test_ai_classifier.py75 "correspondents": {"existing_ids": [], "new_names": ["John Doe"]},CODE
LOWsrc/paperless_ai/tests/test_ai_classifier.py104 "correspondents": {"existing_ids": [], "new_names": ["Jane Doe"]},CODE
LOWsrc/paperless_ai/tests/test_ai_classifier.py117 assert result["correspondents"]["new_names"] == ["John Doe"]CODE
LOWsrc/paperless_ai/tests/test_ai_classifier.py159 assert result["correspondents"]["new_names"] == ["John Doe"]CODE
LOWsrc/paperless_ai/tests/test_client.py134 "correspondents": ["John Doe"],CODE
LOWsrc/paperless_ai/tests/test_client.py174 "correspondents": ["John Doe"],CODE
LOWsrc/paperless/parsers/__init__.py20 author = "Acme Corp"STRING
LOWsrc/paperless/tests/test_adapter.py101 "email": "user@example.com",CODE
LOWsrc/documents/tests/test_workflows.py3554 to="user@example.com",CODE
LOWsrc/documents/tests/test_workflows.py3902 to="user@example.com",CODE
LOWsrc/documents/tests/test_workflows.py4762 to="user@example.com",CODE
LOWsrc/documents/tests/test_workflows.py4896 to="user@example.com",CODE
LOW⚡src/documents/tests/test_api_search.py187 content="Lorem ipsum dolor sit amet, consectetur adipiscing elit.",CODE
LOW⚡src/documents/tests/test_api_search.py187 content="Lorem ipsum dolor sit amet, consectetur adipiscing elit.",CODE
LOW⚡src/documents/tests/search/test_backend.py429 content="Lorem ipsum dolor sit amet, consectetur adipiscing elit.",CODE
LOW⚡src/documents/tests/search/test_backend.py429 content="Lorem ipsum dolor sit amet, consectetur adipiscing elit.",CODE
LOW⚡src/documents/tests/search/test_fuzzy_scoring.py29_PADDING = "lorem ipsum dolor sit amet " * 40CODE
LOW⚡src/documents/tests/search/test_fuzzy_scoring.py29_PADDING = "lorem ipsum dolor sit amet " * 40CODE
Docstring Block Structure7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHsrc/paperless/settings/parsers.py14 Converts a string representation of truth to a boolean value. Recognizes 'true', '1', 't', 'y', 'yes' as True,STRING
HIGHsrc/paperless/settings/parsers.py67 Parses a key-value string into a dictionary, applying defaults and casting types. Supports nested keys via dotSTRING
HIGHsrc/paperless/settings/parsers.py224 Get and parse a list from an environment variable or return a default. Args: key: Environment variableSTRING
HIGHsrc/paperless/settings/parsers.py289 Gets and validates an environment variable against a set of allowed choices. Args: env_key: The enviroSTRING
HIGHsrc/documents/utils.py190 Compute the SHA-256 checksum of a file. Reads the file in chunks to avoid loading the entire file into memory.STRING
HIGHsrc/documents/templating/filters.py11 Format a date, datetime or str object into a localized string using Babel. Args: value (date | datetimSTRING
HIGHsrc/documents/search/_backend.py1095 Get a batch context manager for bulk index operations. Use this for efficient bulk document updates/deSTRING
Redundant / Tautological Comments18 hits · 27 pts
SeverityFileLineSnippetContext
LOWinstall-paperless-ngx.sh64# Check if user has permissions to run Docker by trying to get the status of Docker (docker status).COMMENT
LOWdocker/rootfs/usr/local/bin/deduplicate.py19 # Read file in chunks to handle large files efficientlyCOMMENT
LOWsrc/paperless/validators.py234 # Check if any dangerous pattern is a substring of the styleCOMMENT
LOWsrc/paperless/validators.py245 # Check if value starts with any dangerous schemeCOMMENT
LOWsrc/paperless/tests/parsers/test_mail_parser.py94 # Check if exception is raised when parsing fails.COMMENT
LOWsrc/paperless/tests/parsers/test_mail_parser.py115 # Check if exception is raised when the mail is faulty.COMMENT
LOWsrc/paperless/tests/parsers/test_mail_parser.py444 # Check if exception is raised when Tika cannot be reached.COMMENT
LOWsrc/documents/classifier.py410 # Check if retraining is actually required.COMMENT
LOWsrc/documents/matching.py373 # Check if any tag filters exist to determine if we need to load document tagsCOMMENT
LOWsrc/documents/bulk_edit.py1161 # Check if any documents are going to be removed from the current list of links and remove the symmetrical linksCOMMENT
LOWsrc/documents/filters.py566 # Check if 1) custom field name matches, and 2) value satisfies conditionCOMMENT
LOWsrc/documents/filters.py608 # Check if the operator is supported for the current data_type.COMMENT
LOWsrc/documents/filters.py728 # Check if any of the requested IDs are missing.COMMENT
LOWsrc/documents/signals/handlers.py920 # Check if document was soft deleted (moved to trash)COMMENT
LOWsrc/documents/tests/date_parsing/test_date_parsing.py85 # Check if an error was loggedCOMMENT
LOWsrc/documents/tests/date_parsing/test_date_parsing.py89 # Check if the specific error message is presentCOMMENT
LOWsrc/documents/management/commands/manage_superuser.py33 # Check if there's already a user called adminCOMMENT
LOWsrc/documents/management/commands/manage_superuser.py42 # Check if any superuseruserCOMMENT
Structural Annotation Overuse11 hits · 20 pts
SeverityFileLineSnippetContext
LOW.devcontainer/README.md44### Step 1: Running the DevContainerCOMMENT
LOW.devcontainer/README.md54### Step 2: Initial SetupCOMMENT
LOW⚡src/paperless_ai/tests/test_ai_indexing.py562 # Step 2: delete all documentsCOMMENT
LOW⚡src/paperless_ai/tests/test_ai_indexing.py566 # Step 3: rebuild with no documents — drop_table is called so the tableCOMMENT
LOW⚡src/paperless_ai/tests/test_ai_indexing.py570 # Step 4: the table must be absent (no rows) — phantom vectors goneCOMMENT
LOWsrc/paperless_ai/tests/test_ai_indexing.py548 # Step 1: create a document and build a non-empty indexCOMMENT
LOWsrc/documents/classifier.py356 # Step 1: Extract and preprocess training data from the database.COMMENT
LOWsrc/documents/classifier.py455 # Step 2: vectorize dataCOMMENT
LOWsrc/documents/classifier.py490 # Step 3: train the classifiersCOMMENT
LOW⚡src/documents/templating/utils.py13 # Step 1: Match placeholders with single curly braces but not those with double bracesCOMMENT
LOW⚡src/documents/templating/utils.py16 # Step 2: Replace the placeholders with {{ var }} or {{ }}COMMENT
Cross-Language Confusion4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHsrc/documents/classifier.py429 # subtract 1 since -1 (null) is also part of the classes.COMMENT
HIGHsrc/documents/tests/test_api_bulk_edit.py1695 - A legacy rotate bulk edit with degrees that are null, not anSTRING
HIGH…/documents/management/commands/convert_mariadb_uuid.py21 old_field = models.CharField(null=null, max_length=36)CODE
HIGH…/documents/management/commands/convert_mariadb_uuid.py24 new_field = models.UUIDField(null=null)CODE
Over-Commented Block20 hits · 18 pts
SeverityFileLineSnippetContext
LOWdocker/compose/docker-compose.sqlite.yml1# Docker Compose file for running paperless from the Docker Hub.COMMENT
LOWdocker/compose/docker-compose.mariadb.yml1# Docker Compose file for running paperless from the Docker Hub.COMMENT
LOWdocker/compose/docker-compose.postgres-tika.yml1# Docker Compose file for running paperless from the docker container registry.COMMENT
LOWdocker/compose/docker-compose.postgres.yml1# Docker Compose file for running paperless from the Docker Hub.COMMENT
LOWdocker/compose/docker-compose.sqlite-tika.yml1# Docker Compose file for running paperless from the docker container registry.COMMENT
LOWdocker/compose/docker-compose.mariadb-tika.yml1# docker compose file for running paperless from the Docker Hub.COMMENT
LOWdocker/compose/docker-compose.portainer.yml1# Docker Compose file for running paperless from the Docker Hub.COMMENT
LOW…vcontainer/docker-compose.devcontainer.sqlite-tika.yml1# Docker Compose file for developing Paperless NGX in VSCode DevContainers.COMMENT
LOW.github/workflows/codeql-analysis.yml1# For most projects, this workflow file will not need changing; you simply needCOMMENT
LOWsrc-ui/playwright.config.ts61COMMENT
LOWsrc/paperless_ai/vector_store.py41# this to decide which migrations to run on an existing store.COMMENT
LOWsrc/paperless_ai/vector_store.py221 conn.row_factory = sqlite3.RowCOMMENT
LOWsrc/paperless_ai/indexing.py81 )COMMENT
LOWsrc/paperless_ai/tests/test_vector_store.py1101 vec_table_spy = mocker.spy(COMMENT
LOWsrc/paperless/settings/__init__.py41 load_dotenv(path)COMMENT
LOWsrc/documents/views.py281 from paperless_ai.base_model import TaxonomyChoiceDictCOMMENT
LOWsrc/documents/views.py1141 # favor of the Tantivy-backed search endpoint (see filters.py'sCOMMENT
LOWsrc/documents/tests/search/test_documented_syntax.py341 # Zero-width: these resolve to a single instant, not a span, soCOMMENT
LOWsrc/documents/search/_query.py41# Uses Unicode properties to cover all blocks including Extension B+ planes.COMMENT
LOWsrc/documents/search/_query.py301 # produce bigrams spanning the join. A run's own bigrams stayCOMMENT
Modern Structural Boilerplate16 hits · 18 pts
SeverityFileLineSnippetContext
LOW⚡src/paperless_ai/tables.py192 def set_dim(conn: sqlite3.Connection, dim: int) -> None:CODE
LOW⚡src/paperless_ai/tables.py200 def set_embed_model(conn: sqlite3.Connection, name: str) -> None:CODE
LOW⚡src/paperless_ai/tables.py209 def set_schema_version(conn: sqlite3.Connection, version: int) -> None:CODE
LOWsrc/paperless/__init__.py7__all__ = [CODE
LOWsrc/paperless/settings/custom.py15logger = logging.getLogger(__name__)CODE
LOWsrc/paperless/settings/parsers.py88 def _set_nested(d: dict, keys: list[str], value: Any) -> None:CODE
LOWsrc/paperless/parsers/__init__.py50__all__ = [CODE
LOWsrc/documents/classifier.py224 def _update_data_vectorizer_hash(self) -> None:CODE
LOW⚡src/documents/tasks.py805def update_document_in_llm_index(document) -> None:CODE
LOWsrc/documents/tasks.py695def update_document_parent_tags(tag: Tag, new_parent: Tag) -> None:CODE
LOWsrc/documents/__init__.py4__all__ = ["parser_check"]CODE
LOWsrc/documents/serialisers.py258 def _set_permissions(self, permissions, object) -> None:CODE
LOWsrc/documents/plugins/date_parsing/__init__.py16logger = logging.getLogger(__name__)CODE
LOWsrc/documents/plugins/date_parsing/__init__.py96__all__ = [CODE
LOWsrc/documents/plugins/date_parsing/base.py12logger = logging.getLogger(__name__)CODE
LOWsrc/documents/search/__init__.py18__all__ = [CODE
Verbosity Indicators9 hits · 17 pts
SeverityFileLineSnippetContext
LOW⚡src/paperless_ai/tests/test_ai_indexing.py562 # Step 2: delete all documentsCOMMENT
LOW⚡src/paperless_ai/tests/test_ai_indexing.py566 # Step 3: rebuild with no documents — drop_table is called so the tableCOMMENT
LOW⚡src/paperless_ai/tests/test_ai_indexing.py570 # Step 4: the table must be absent (no rows) — phantom vectors goneCOMMENT
LOWsrc/paperless_ai/tests/test_ai_indexing.py548 # Step 1: create a document and build a non-empty indexCOMMENT
LOWsrc/documents/classifier.py356 # Step 1: Extract and preprocess training data from the database.COMMENT
LOWsrc/documents/classifier.py455 # Step 2: vectorize dataCOMMENT
LOWsrc/documents/classifier.py490 # Step 3: train the classifiersCOMMENT
LOW⚡src/documents/templating/utils.py13 # Step 1: Match placeholders with single curly braces but not those with double bracesCOMMENT
LOW⚡src/documents/templating/utils.py16 # Step 2: Replace the placeholders with {{ var }} or {{ }}COMMENT
Modern AI Meta-Vocabulary4 hits · 11 pts
SeverityFileLineSnippetContext
MEDIUMdocs/advanced_usage.md150### The LLM index (RAG) and similar documentsCOMMENT
MEDIUMdocs/usage.md334See [AI features](advanced_usage.md#ai-features) for how to enable and configure these features, including choosing an LCODE
MEDIUMsrc-ui/README.md9## Code scaffoldingCOMMENT
MEDIUMsrc/paperless_ai/ai_classifier.py33# neighbours get their text spliced into the RAG context block). A widerCOMMENT
AI Slop Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml17# TODO: Move certain things to groups and then utilize that furtherSTRING
MEDIUMsrc/paperless/parsers/tesseract.py242 # the whole text, so do not utilize it in that caseCOMMENT
LOWsrc/documents/views.py2932 # if all is not true, just pass through the provided document idsCOMMENT
AI Structural Patterns5 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/paperless/settings/__init__.py751CODE
LOWsrc/paperless_mail/tests/helpers.py199CODE
LOWsrc/documents/parsers.py71CODE
LOWsrc/documents/views.py2481CODE
LOWsrc/documents/tests/test_management_exporter.py159CODE
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMsrc/documents/tests/search/test_backend.py871CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/paperless/network.py155 def handle_request(self, request: httpx.Request) -> httpx.Response:CODE