Repository Analysis

internetarchive/openlibrary

One webpage for every book ever published!

9.6 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of internetarchive/openlibrary, a Python project with 6,639 GitHub stars. SynthScan v2.0 examined 248,220 lines of code across 1580 source files, recording 1731 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 9.6 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

9.6
Adjusted Score
9.6
Raw Score
100%
Time Factor
2026-08-29
Last Push
6.6K
Stars
Python
Language
248.2K
Lines of Code
1.6K
Files
1.7K
Pattern Hits
2026-08-29
Scan Date
0.03
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 6HIGH 44MEDIUM 120LOW 1561

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1731 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers1116 hits · 1166 pts
SeverityFileLineSnippetContext
LOWdocker/mockservices/main.py303async def _loan_changes_ongoing_loop() -> None:CODE
LOWdocker/mockservices/tests/test_e2e.py56 def test_authenticate_succeeds_with_password(self):CODE
LOWdocker/mockservices/tests/test_e2e.py68 def test_authenticate_fails_without_password(self):CODE
LOWdocker/mockservices/tests/test_e2e.py78 def test_authenticate_fails_with_sentinel_bad_password(self):CODE
LOWdocker/mockservices/tests/test_e2e.py98 def test_redeem_otp_correct_code(self):CODE
LOWdocker/mockservices/tests/test_e2e.py109 def test_redeem_otp_wrong_code(self):CODE
LOWdocker/mockservices/tests/test_e2e.py151 def test_unauthorized_missing_header(self):CODE
LOWdocker/mockservices/tests/test_e2e.py157def test_loan_post_returns_empty_success():CODE
LOWdocker/mockservices/tests/test_e2e.py181 def test_catchup_seeds_events_in_increasing_uid_order(self):CODE
LOWdocker/mockservices/tests/test_e2e.py189 def test_pagination_respects_after_uid(self):CODE
LOWdocker/mockservices/tests/test_e2e.py198 def test_row_shape_matches_get_loan_changes_contract(self):CODE
LOWtests/test_docker_compose.py12 def test_all_root_services_must_be_in_prod(self):CODE
LOWtests/test_docker_compose.py27 def test_all_prod_services_need_profile(self):CODE
LOWtests/unit/js/search.test.js116function checkFacetMoreLessVisibility(totalFacet, minVisibleFacet, expectedVisibleFacet) {CODE
LOWtests/unit/js/SelectionManager.test.js3function createTestElementsForProcessClick() {CODE
LOWtests/integration/test_fastapi_auth.py80def test_logout_clears_session(session):CODE
LOWtests/integration/test_fastapi_auth.py91def test_relogin_after_logout(session):CODE
LOWtests/integration/test_fastapi_auth.py102def test_login_with_invalid_credentials(session):CODE
LOWdocs/ai/i18n.md72export function searchModalStringsFromElement(el) {CODE
LOWopenlibrary/book_providers.py59 def to_acquisition_access_literal(self) -> AcquisitionAccessLiteral | None:CODE
LOWopenlibrary/book_providers.py742def get_book_provider_by_name(name: str) -> AbstractBookProvider | None:CODE
LOWopenlibrary/core/ia.py147def edition_from_item_metadata(itemid: str, metadata: dict) -> ItemEdition | None:CODE
LOWopenlibrary/core/db.py66 def update_work_ids_individually(cls, current_work_id, new_work_id, _test=False):CODE
LOWopenlibrary/core/vendors.py595async def get_amazon_metadata_async(CODE
LOWopenlibrary/core/vendors.py701def clean_amazon_metadata_for_load(metadata: dict) -> dict:CODE
LOWopenlibrary/core/vendors.py745def create_edition_from_amazon_metadata(id_: str, id_type: Literal["asin", "isbn"] = "isbn") -> str | None:CODE
LOWopenlibrary/core/vendors.py779async def get_betterworldbooks_metadata(CODE
LOWopenlibrary/core/vendors.py805async def _get_betterworldbooks_metadata(CODE
LOWopenlibrary/core/yearly_reading_goals.py53 def select_by_username_and_year(cls, username: str, year: int) -> list[dict]:CODE
LOWopenlibrary/core/yearly_reading_goals.py65 def total_yearly_reading_goals(cls, since: date | None = None) -> int:CODE
LOWopenlibrary/core/yearly_reading_goals.py110 def delete_by_username_and_year(cls, username: str, year: int) -> None:CODE
LOWopenlibrary/core/models.py465 def make_work_from_orphaned_edition(self):CODE
LOWopenlibrary/core/models.py495def update_list_seed_metadata(a: ListSeedMetadata, b: ListSeedMetadata) -> None:CODE
LOWopenlibrary/core/models.py554 def get_patrons_who_also_read(self):CODE
LOWopenlibrary/core/models.py592 def get_num_users_by_bookshelf(self):CODE
LOWopenlibrary/core/models.py988 def is_super_librarian_or_higher(self) -> bool:CODE
LOWopenlibrary/core/booknotes.py71 def count_total_booksnotes_by_user(cls, username):CODE
LOWopenlibrary/core/booknotes.py79 def count_works_with_notes_by_user(cls, username):CODE
LOWopenlibrary/core/booknotes.py131 def get_notes_grouped_by_work(cls, username, limit=25, page=1):STRING
LOWopenlibrary/core/observations.py563def _get_deleted_types_and_values():CODE
LOWopenlibrary/core/observations.py602def _get_all_types_and_values():CODE
LOWopenlibrary/core/observations.py790 def count_unique_respondents_by_type(cls, work_id):CODE
LOWopenlibrary/core/observations.py858 def count_distinct_observations(cls, username):CODE
LOWopenlibrary/core/observations.py914 def get_observations_for_work(cls, work_id):CODE
LOWopenlibrary/core/observations.py920 def get_observations_grouped_by_work(cls, username, limit=25, page=1):CODE
LOWopenlibrary/core/imports.py321 def _get_count_by_date_status(ndays=10):CODE
LOWopenlibrary/core/imports.py358 def _get_books_imported_per_day():CODE
LOWopenlibrary/core/imports.py375 def get_books_imported_per_day(cls, use_cache=False):STRING
LOWopenlibrary/core/bookshelves.py176 def count_total_books_logged_by_user(cls, username: str, bookshelf_ids: list[str] | None = None) -> int:STRING
LOWopenlibrary/core/bookshelves.py184 def count_user_books_on_shelf(STRING
LOWopenlibrary/core/bookshelves.py202 def count_total_books_logged_by_user_per_shelf(cls, username: str, bookshelf_ids: list[str] | None = None) -> dict[iSTRING
LOWopenlibrary/core/bookshelves.py250 async def add_storage_items_for_redirects(cls, reading_log_keys, solr_docs: list[web.Storage]):STRING
LOWopenlibrary/core/bookshelves.py312 def add_storage_items_for_deletes(cls, reading_log_keys, solr_docs: list[web.Storage]):STRING
LOWopenlibrary/core/bookshelves.py410 async def get_filtered_reading_log_books(CODE
LOWopenlibrary/core/bookshelves.py472 async def get_sorted_reading_log_books(CODE
LOWopenlibrary/core/bookshelves.py549 def iterate_users_logged_books(cls, username: str) -> Iterable[dict]:STRING
LOWopenlibrary/core/bookshelves.py571 def get_recently_logged_books(STRING
LOWopenlibrary/core/bookshelves.py589 def get_users_read_status_of_work(cls, username: str, work_id: str) -> int | None:STRING
LOWopenlibrary/core/bookshelves.py608 def get_users_read_status_of_works(cls, username: str, work_ids: list[str]) -> list:STRING
LOWopenlibrary/core/bookshelves.py676 def get_num_users_by_bookshelf_by_work_id(cls, work_id: str) -> dict[int, int]:CODE
1056 more matches not shown…
Cross-Language Confusion42 hits · 278 pts
SeverityFileLineSnippetContext
HIGHopenlibrary/plugins/admin/code.py170 "cd %s && git pull" % root,CODE
HIGHopenlibrary/plugins/upstream/jsdef.py78 self.push("Hello "); self.push(websafe(name)); self.push("!\n");CODE
HIGHopenlibrary/plugins/upstream/jsdef.py129 text = ["self.push(%s);" % self.jsemit(n, "") for n in node.nodes]STRING
HIGHopenlibrary/plugins/upstream/jsdef.py228 'x && y'CODE
HIGHopenlibrary/plugins/upstream/jsdef.py253 'self.push(websafe(x));\n'CODE
HIGHopenlibrary/plugins/upstream/jsdef.py255 'self.push(x);\n'CODE
HIGHopenlibrary/plugins/upstream/jsdef.py259 'var x = a && b;\n'CODE
HIGHopenlibrary/plugins/upstream/jsdef.py261 'if (a || ! b) {\n self.push(websafe(a));\n}\n'CODE
HIGHopenlibrary/plugins/upstream/jsdef.py263 'foreach(a && a.data || [], loop, function(loop, i) {\n self.push(websafe(i));\n});\n'CODE
HIGHopenlibrary/plugins/upstream/jsdef.py263 'foreach(a && a.data || [], loop, function(loop, i) {\n self.push(websafe(i));\n});\n'CODE
HIGHopenlibrary/tests/core/test_db.py37 edition_id integer default null,CODE
HIGHopenlibrary/tests/core/test_db.py44 work_id INTEGER not null,CODE
HIGHopenlibrary/tests/core/test_db.py46 username text not null,CODE
HIGHopenlibrary/tests/core/test_db.py47 observation_type INTEGER not null,CODE
HIGHopenlibrary/tests/core/test_db.py48 observation_value INTEGER not null,CODE
HIGHopenlibrary/tests/core/test_db.py56 submitter text not null,CODE
HIGHopenlibrary/tests/core/test_db.py57 reviewer text default null,CODE
HIGHopenlibrary/tests/core/test_db.py58 url text not null,CODE
HIGHopenlibrary/tests/core/test_db.py66 username text not null,CODE
HIGHopenlibrary/tests/core/test_db.py67 work_id integer not null,CODE
HIGHopenlibrary/tests/core/test_db.py68 edition_id integer not null,CODE
HIGHopenlibrary/tests/core/test_db.py69 event_type integer not null,CODE
HIGHopenlibrary/tests/core/test_db.py70 event_date text not null,CODE
HIGHopenlibrary/tests/core/test_db.py77 username text not null,CODE
HIGHopenlibrary/tests/core/test_db.py78 year integer not null,CODE
HIGHopenlibrary/tests/core/test_db.py79 target integer not null,CODE
HIGHopenlibrary/tests/core/test_db.py17 edition_id integer default null,CODE
HIGHopenlibrary/tests/core/test_acquisitions.py13 work_id integer not null,CODE
HIGHopenlibrary/tests/core/test_acquisitions.py14 edition_id integer not null,CODE
HIGHopenlibrary/tests/core/test_acquisitions.py15 provider_name text not null,CODE
HIGHopenlibrary/tests/core/test_acquisitions.py16 local_id text not null,CODE
HIGHopenlibrary/tests/core/test_acquisitions.py17 data json not null,CODE
HIGHopenlibrary/tests/core/test_jinja.py132 assert isinstance(env.undefined, type(jinja2.StrictUndefined))CODE
HIGHopenlibrary/utils/solr.py98 # Solr returns {doc: null} if the record isn't thereCOMMENT
HIGHopenlibrary/utils/schema.py382 slug character varying(255) unique not null,STRING
HIGHopenlibrary/utils/schema.py383 title character varying(255) not null,STRING
HIGHopenlibrary/utils/schema.py399 slug varchar(255) unique not null,STRING
HIGHopenlibrary/utils/schema.py400 title varchar(255) not null,STRING
HIGHscripts/utils/scheduler.py36 misfire_grace_time=undefined,CODE
HIGHscripts/utils/scheduler.py37 coalesce=undefined,CODE
HIGHscripts/utils/scheduler.py38 max_instances=undefined,CODE
HIGHscripts/utils/scheduler.py39 next_run_time=undefined,CODE
Decorative Section Separators72 hits · 254 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml241# ── Rule Exclusions ──────────────────────────────────────────────────COMMENT
MEDIUMdocker/mockservices/main.py207# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py210# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py218# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py228# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py325# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py328# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py336# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py339# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py347# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py350# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py358# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py361# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py369# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py372# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py60# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py74# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py182# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py187# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py391# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/mockservices/main.py393# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/js/searchFacets.test.js18// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js20// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js29// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js31// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js140// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js142// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js238// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/js/searchFacets.test.js240// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/plugins/openlibrary/js/SearchFilterBar.js52// ── Facet field config ─────────────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/plugins/openlibrary/js/SearchFilterBar.js59// ── sessionStorage helpers ─────────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/plugins/openlibrary/js/SearchFilterBar.js69// ── URL / sticky-filter helpers ────────────────────────────────────────────COMMENT
MEDIUM…ary/plugins/openlibrary/js/search-modal/SearchModal.js953 // ── Render ────────────────────────────────────────────────────────────COMMENT
MEDIUM…ary/plugins/openlibrary/js/search-modal/SearchModal.js1385 // ── Event handlers ───────────────────────────────────────────────────COMMENT
MEDIUM…ary/plugins/openlibrary/js/search-modal/SearchModal.js1593 // ── Data layer ───────────────────────────────────────────────────────COMMENT
MEDIUM…ary/plugins/openlibrary/js/search-modal/SearchModal.js1734 // ── Static icons ─────────────────────────────────────────────────────COMMENT
MEDIUM…ibrary/plugins/openlibrary/tests/test_patron_status.py18# ---------------------------------------------------------------------------COMMENT
MEDIUM…ibrary/plugins/openlibrary/tests/test_patron_status.py20# ---------------------------------------------------------------------------COMMENT
MEDIUM…ibrary/plugins/openlibrary/tests/test_patron_status.py44# ---------------------------------------------------------------------------COMMENT
MEDIUM…ibrary/plugins/openlibrary/tests/test_patron_status.py46# ---------------------------------------------------------------------------COMMENT
MEDIUMopenlibrary/tests/core/test_processors.py133# ---------------------------------------------------------------------------COMMENT
MEDIUMopenlibrary/tests/core/test_processors.py135# ---------------------------------------------------------------------------COMMENT
MEDIUMopenlibrary/tests/fastapi/test_auth.py76# ---------------------------------------------------------------------------COMMENT
MEDIUMopenlibrary/tests/fastapi/test_auth.py78# ---------------------------------------------------------------------------COMMENT
MEDIUMopenlibrary/tests/fastapi/test_auth.py109# ---------------------------------------------------------------------------COMMENT
MEDIUMopenlibrary/tests/fastapi/test_auth.py111# ---------------------------------------------------------------------------COMMENT
MEDIUMopenlibrary/tests/fastapi/test_auth.py229# ---------------------------------------------------------------------------COMMENT
MEDIUMopenlibrary/tests/fastapi/test_auth.py231# ---------------------------------------------------------------------------COMMENT
MEDIUMopenlibrary/components/TestingEnvironment.vue42// ── Composables ─────────────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/components/TestingEnvironment.vue55// ── Derived state ───────────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/components/TestingEnvironment.vue63// ── Deploy favicon badge ────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/components/lit/OlMenuPopover.js268 // ── Event handlers ───────────────────────────────────────────COMMENT
MEDIUMopenlibrary/components/lit/OlOptionsPopover.js367 // ── Event handlers ───────────────────────────────────────────COMMENT
MEDIUMopenlibrary/components/lit/OlToggle.js269 // ── Form participation (FormAssociatedMixin) ─────────────────────────COMMENT
MEDIUMopenlibrary/components/lit/OlSelectPopover.js639 // ── State helpers ────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/components/lit/OlSelectPopover.js645 // ── Event handlers ───────────────────────────────────────────COMMENT
MEDIUMopenlibrary/components/lit/OlSegmentedControl.js342 // ── Form participation (FormAssociatedMixin) ─────────────────────────COMMENT
MEDIUMopenlibrary/components/lit/OlPopover.js401 // ── Show / Hide ─────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/components/lit/OlPopover.js561 // ── Trigger ARIA ────────────────────────────────────────────COMMENT
MEDIUMopenlibrary/components/lit/OlPopover.js575 // ── Focus containment (non-modal: Tab out closes) ───────────COMMENT
12 more matches not shown…
Unused Imports101 hits · 100 pts
SeverityFileLineSnippetContext
LOWopenlibrary/conftest.py12CODE
LOWopenlibrary/conftest.py13CODE
LOWopenlibrary/conftest.py16CODE
LOWopenlibrary/code.py23CODE
LOWopenlibrary/code.py24CODE
LOWopenlibrary/code.py25CODE
LOWopenlibrary/code.py26CODE
LOWopenlibrary/code.py27CODE
LOWopenlibrary/code.py28CODE
LOWopenlibrary/code.py33CODE
LOWopenlibrary/code.py51CODE
LOWopenlibrary/asgi_app.py1CODE
LOWopenlibrary/asgi_app.py55CODE
LOWopenlibrary/core/acquisitions.py14CODE
LOWopenlibrary/core/vendors.py1CODE
LOWopenlibrary/core/helpers.py24CODE
LOWopenlibrary/core/helpers.py25CODE
LOWopenlibrary/core/lending.py3CODE
LOWopenlibrary/core/lists/model.py13CODE
LOWopenlibrary/core/lists/model.py14CODE
LOWopenlibrary/core/lists/model.py15CODE
LOWopenlibrary/core/processors/__init__.py1CODE
LOWopenlibrary/plugins/admin/code.py21CODE
LOWopenlibrary/plugins/admin/code.py542CODE
LOWopenlibrary/plugins/openlibrary/home.py8CODE
LOWopenlibrary/plugins/openlibrary/code.py1175CODE
LOWopenlibrary/plugins/openlibrary/utils.py1CODE
LOWopenlibrary/plugins/worksearch/bulk_search.py1CODE
LOWopenlibrary/plugins/importapi/tests/test_code.py4CODE
LOWopenlibrary/plugins/upstream/addbook.py20CODE
LOWopenlibrary/plugins/upstream/models.py12CODE
LOWopenlibrary/plugins/upstream/models.py14CODE
LOWopenlibrary/plugins/upstream/models.py25CODE
LOWopenlibrary/plugins/upstream/code.py19CODE
LOWopenlibrary/plugins/upstream/code.py26CODE
LOWopenlibrary/plugins/upstream/code.py27CODE
LOWopenlibrary/plugins/upstream/code.py27CODE
LOWopenlibrary/plugins/upstream/code.py27CODE
LOWopenlibrary/plugins/upstream/jsdef.py60CODE
LOWopenlibrary/plugins/upstream/mybooks.py11CODE
LOWopenlibrary/plugins/upstream/borrow.py28CODE
LOWopenlibrary/plugins/upstream/data.py8CODE
LOWopenlibrary/plugins/upstream/account.py1CODE
LOWopenlibrary/plugins/upstream/account.py17CODE
LOWopenlibrary/plugins/upstream/tests/test_utils.py9CODE
LOWopenlibrary/tests/catalog/test_utils.py5CODE
LOWopenlibrary/tests/fastapi/conftest.py1CODE
LOWopenlibrary/tests/fastapi/test_link.py3CODE
LOWopenlibrary/tests/fastapi/test_search.py1CODE
LOWopenlibrary/tests/fastapi/test_auth.py3CODE
LOWopenlibrary/tests/fastapi/test_public_my_books.py7CODE
LOWopenlibrary/tests/fastapi/test_account.py3CODE
LOWopenlibrary/utils/template_usage.py16CODE
LOWopenlibrary/utils/request_context.py8CODE
LOWopenlibrary/utils/isbn.py1CODE
LOWopenlibrary/utils/ddc.py10CODE
LOWopenlibrary/utils/lcc.py88CODE
LOWopenlibrary/fastapi/auth.py8CODE
LOWopenlibrary/fastapi/lists.py1CODE
LOWopenlibrary/fastapi/importapi.py5CODE
41 more matches not shown…
Excessive Try-Catch Wrapping80 hits · 100 pts
SeverityFileLineSnippetContext
LOWopenlibrary/code.py44 except Exception as e:CODE
LOWopenlibrary/asgi_app.py203 except Exception:CODE
LOWopenlibrary/core/ia.py46 except Exception:CODE
LOWopenlibrary/core/vendors.py57 except Exception as e: # noqa: BLE001CODE
LOWopenlibrary/core/vendors.py246 except Exception:CODE
LOWopenlibrary/core/vendors.py438 except Exception as e:CODE
LOWopenlibrary/core/vendors.py496 except Exception:CODE
LOWopenlibrary/core/vendors.py800 except Exception:CODE
MEDIUMopenlibrary/core/vendors.py49def get_lexile(isbn):CODE
LOWopenlibrary/core/imports.py183 except Exception: # noqa: BLE001CODE
LOWopenlibrary/core/imports.py210 except Exception: # noqa: BLE001CODE
LOWopenlibrary/core/bookshelves.py661 except Exception: # we want to catch no entry existsCODE
LOWopenlibrary/core/bookshelves.py672 except Exception:CODE
LOWopenlibrary/core/stats.py34 except Exception as e:CODE
LOWopenlibrary/core/helpers.py186 except Exception:CODE
LOWopenlibrary/core/helpers.py196 except Exception:CODE
LOWopenlibrary/core/lending.py314 except Exception: # TODO: Narrow exception scopeCODE
LOWopenlibrary/core/lending.py475 except Exception as e: # TODO: Narrow exception scopeCODE
LOWopenlibrary/core/lending.py610 except Exception: # TODO: Narrow exception scopeCODE
LOWopenlibrary/core/lending.py643 except Exception: # TODO: Narrow exception scopeCODE
LOWopenlibrary/core/lending.py648 except Exception: # TODO: Narrow exception scopeCODE
LOWopenlibrary/core/lending.py782 except Exception: # TODO: Narrow exception scopeCODE
LOWopenlibrary/core/lending.py1047 except Exception: # TODO: Narrow exception scopeCODE
MEDIUMopenlibrary/core/lending.py988def find_loans(self, **kw):CODE
LOWopenlibrary/plugins/ol_infobase.py86 except Exception as e:CODE
LOWopenlibrary/plugins/ol_infobase.py111 except Exception:CODE
LOWopenlibrary/plugins/ol_infobase.py311 except Exception:CODE
LOWopenlibrary/plugins/ol_infobase.py369 except Exception:CODE
LOWopenlibrary/plugins/ol_infobase.py486 except Exception:CODE
MEDIUMopenlibrary/plugins/ol_infobase.py79def setup_logging():CODE
MEDIUMopenlibrary/plugins/ol_infobase.py130def get_thing_id(key):CODE
LOWopenlibrary/plugins/admin/services.py17 except Exception as m:CODE
MEDIUMopenlibrary/plugins/admin/services.py14def __init__(self, url):CODE
MEDIUMopenlibrary/plugins/books/readlinks.py305 print("Error in processing Read API", file=sys.stderr)CODE
MEDIUMopenlibrary/plugins/books/dynlinks.py585 print("Error in processing Books API", file=sys.stderr)CODE
LOWopenlibrary/plugins/openlibrary/home.py44 except Exception:CODE
MEDIUMopenlibrary/plugins/openlibrary/home.py41def get_homepage(devmode):CODE
LOWopenlibrary/plugins/openlibrary/code.py597 except Exception as e:CODE
LOWopenlibrary/plugins/openlibrary/code.py909 except Exception as e:CODE
LOWopenlibrary/plugins/openlibrary/stats.py47 except Exception as k:CODE
LOWopenlibrary/plugins/openlibrary/stats.py69 except Exception as e:CODE
LOWopenlibrary/plugins/worksearch/subjects.py156 except Exception:CODE
LOWopenlibrary/plugins/importapi/code.py198 except Exception as e:CODE
LOWopenlibrary/plugins/upstream/models.py578 except Exception:CODE
MEDIUMopenlibrary/plugins/upstream/models.py575def get_covers_from_solr(self) -> list[Image]:CODE
LOWopenlibrary/plugins/upstream/mybooks.py110 except Exception:CODE
LOWopenlibrary/plugins/upstream/utils.py1384 except Exception:CODE
MEDIUMopenlibrary/plugins/upstream/utils.py517def get_version(key, revision):CODE
LOWopenlibrary/plugins/upstream/account.py141 except Exception:CODE
LOWopenlibrary/plugins/upstream/account.py1388 except Exception as e:CODE
LOWopenlibrary/admin/stats.py92 except Exception as k:CODE
LOWopenlibrary/utils/retry.py25 except Exception as e:CODE
LOWopenlibrary/utils/retry.py41 except Exception as e:CODE
LOWopenlibrary/fastapi/account.py200 except Exception:CODE
LOWopenlibrary/fastapi/account.py216 except Exception:CODE
LOWopenlibrary/fastapi/account.py395 except Exception as e: # noqa: BLE001CODE
LOWopenlibrary/i18n/__init__.py69 except Exception as e:CODE
LOWopenlibrary/i18n/__init__.py145 except Exception as e:CODE
MEDIUMopenlibrary/i18n/__init__.py61def _compile_translation(po, mo):CODE
LOWscripts/delete_import_items.py70 except Exception as e:CODE
20 more matches not shown…
Deep Nesting95 hits · 94 pts
SeverityFileLineSnippetContext
LOWopenlibrary/api.py235CODE
LOWopenlibrary/api.py255CODE
LOWopenlibrary/book_providers.py756CODE
LOWopenlibrary/book_providers.py44CODE
LOWopenlibrary/book_providers.py126CODE
LOWopenlibrary/core/ia.py289CODE
LOWopenlibrary/core/ia.py316CODE
LOWopenlibrary/core/observations.py563CODE
LOWopenlibrary/core/olmarkdown.py38CODE
LOWopenlibrary/core/imports.py103CODE
LOWopenlibrary/core/helpers.py338CODE
LOWopenlibrary/core/lending.py541CODE
LOWopenlibrary/core/lending.py1056CODE
LOWopenlibrary/core/lists/model.py429CODE
LOWopenlibrary/core/lists/model.py512CODE
LOWopenlibrary/core/lists/model.py568CODE
LOWopenlibrary/plugins/admin/code.py309CODE
LOWopenlibrary/plugins/openlibrary/lists.py83CODE
LOWopenlibrary/plugins/openlibrary/lists.py349CODE
LOWopenlibrary/plugins/openlibrary/lists.py930CODE
LOWopenlibrary/plugins/openlibrary/design_tokens.py167CODE
LOWopenlibrary/plugins/openlibrary/design_tokens.py307CODE
LOWopenlibrary/plugins/openlibrary/code.py613CODE
LOWopenlibrary/plugins/openlibrary/connection.py31CODE
LOWopenlibrary/plugins/openlibrary/stats.py26CODE
LOW…ibrary/plugins/openlibrary/tests/test_design_tokens.py356CODE
LOWopenlibrary/plugins/worksearch/code.py262CODE
LOWopenlibrary/plugins/worksearch/code.py338CODE
LOWopenlibrary/plugins/worksearch/subjects.py556CODE
LOWopenlibrary/plugins/worksearch/schemes/works.py673CODE
LOWopenlibrary/plugins/worksearch/schemes/works.py710CODE
LOWopenlibrary/plugins/worksearch/schemes/works.py298CODE
LOWopenlibrary/plugins/worksearch/schemes/works.py319CODE
LOWopenlibrary/plugins/worksearch/schemes/works.py624CODE
LOWopenlibrary/plugins/worksearch/schemes/works.py437CODE
LOWopenlibrary/plugins/importapi/import_rdf.py74CODE
LOWopenlibrary/plugins/importapi/code.py66CODE
LOWopenlibrary/plugins/importapi/code.py393CODE
LOWopenlibrary/plugins/upstream/addbook.py361CODE
LOWopenlibrary/plugins/upstream/addbook.py552CODE
LOWopenlibrary/plugins/upstream/addbook.py923CODE
LOWopenlibrary/plugins/upstream/models.py575CODE
LOWopenlibrary/plugins/upstream/code.py266CODE
LOWopenlibrary/plugins/upstream/code.py304CODE
LOWopenlibrary/plugins/upstream/mybooks.py71CODE
LOWopenlibrary/plugins/upstream/edits.py147CODE
LOWopenlibrary/plugins/upstream/edits.py203CODE
LOWopenlibrary/plugins/upstream/edits.py247CODE
LOWopenlibrary/plugins/upstream/borrow.py150CODE
LOWopenlibrary/plugins/upstream/borrow.py502CODE
LOWopenlibrary/plugins/upstream/account.py97CODE
LOWopenlibrary/plugins/upstream/account.py778CODE
LOWopenlibrary/catalog/marc/get_subjects.py61CODE
LOWopenlibrary/catalog/marc/parse.py170CODE
LOWopenlibrary/catalog/marc/parse.py367CODE
LOWopenlibrary/catalog/marc/parse.py454CODE
LOWopenlibrary/catalog/marc/parse.py571CODE
LOWopenlibrary/catalog/marc/parse.py629CODE
LOWopenlibrary/catalog/marc/tests/test_marc_binary.py45CODE
LOWopenlibrary/catalog/add_book/__init__.py393CODE
35 more matches not shown…
Hallucination Indicators6 hits · 82 pts
SeverityFileLineSnippetContext
CRITICALtests/unit/js/formAssociatedMixin.test.js153 const data = el._internals.setFormValue.mock.calls.at(-1)[0];CODE
CRITICALopenlibrary/plugins/openlibrary/js/index.js371 if (!window.ILE.selectionManager.selectedItems.work.includes(workOlid)) {CODE
CRITICALopenlibrary/components/LibraryExplorer.vue175 book3d: this.settingsState.styles.book.selected.startsWith('3d'),CODE
CRITICALscripts/solr_builder/README.md57##### java.lang.NoSuchMethodError: 'boolean org.kohsuke.groovy.sandbox.SandboxTransformer.mightBePositionalArgumentConstCOMMENT
CRITICALscripts/solr_builder/README.md59java.lang.NoSuchMethodError: 'boolean org.kohsuke.groovy.sandbox.SandboxTransformer.mightBePositionalArgumentConstructorCODE
CRITICALscripts/solr_builder/README.md60 at com.cloudbees.groovy.cps.SandboxCpsTransformer.visitAssignmentOrCast(SandboxCpsTransformer.java:93)CODE
Self-Referential Comments26 hits · 76 pts
SeverityFileLineSnippetContext
MEDIUMcompose.selinux.yaml1# This file is meant to be applied as overrides when running podman/dockerCOMMENT
MEDIUMcompose.override.yaml1# This file is applied "on top" of compose.yaml when docker composeCOMMENT
MEDIUMopenlibrary/app.py35# Defining a class extending from _app.page auto-registers it inside infogami.COMMENT
MEDIUMopenlibrary/core/models.py424 # Create a list of ISBNs (or an ASIN) to match.COMMENT
MEDIUMopenlibrary/core/bookshelves.py391 # Create a mapping of work keys to ReadingLogItem from the reading log DB.COMMENT
MEDIUMopenlibrary/core/batch_imports.py133 # Create the batchCOMMENT
MEDIUMopenlibrary/core/lending.py319# Create a sync wrapper for backward compatibilityCOMMENT
MEDIUMopenlibrary/core/lists/model.py209 # Create the return dictionaryCOMMENT
MEDIUMopenlibrary/plugins/openlibrary/lists.py367 # Creating a new listCOMMENT
MEDIUMopenlibrary/plugins/openlibrary/events.py23 # Create a thing object to pass to event listeners.COMMENT
MEDIUMopenlibrary/plugins/worksearch/code.py249# Create a sync wrapper for backward compatibilityCOMMENT
MEDIUMopenlibrary/plugins/upstream/addbook.py602 # Create a new work if so desiredCOMMENT
MEDIUMopenlibrary/plugins/upstream/merge_authors.py24 # Create the actual redirect objectsCOMMENT
MEDIUMopenlibrary/tests/core/test_lists_model.py52 # Create a mock list with seedsCOMMENT
MEDIUMopenlibrary/tests/core/test_lists_model.py75 # Create a mock list with seedsCOMMENT
MEDIUMopenlibrary/utils/open_syllabus_project.py74 # Create an SQLite database and tableCOMMENT
MEDIUMopenlibrary/solr/solr_types.py1# This file is auto-generated by generate_solr_types.pyCOMMENT
MEDIUMopenlibrary/solr/generate_solr_types.py76 python = f"""# This file is auto-generated by generate_solr_types.pyCODE
MEDIUMopenlibrary/accounts/model.py134 # Create the data portionCOMMENT
MEDIUMopenlibrary/fastapi/auth.py45# Define the session cookie as a FastAPI security scheme so it appearsCOMMENT
MEDIUMopenlibrary/data/db.py89 # Create a new database to avoid this transaction interfere with the application codeCOMMENT
MEDIUMscripts/oldump.sh3# Create a dump of all Open Library records, and generate sitemapsCOMMENT
MEDIUMscripts/manage-imports.py79 """This method is mostly for testing. It allows you to import one moreSTRING
MEDIUMscripts/update_stale_ocaid_references.py72 # Create a session with configured retriesCOMMENT
MEDIUMscripts/bulk_load_ia_query.py167 # Create a session with configured retriesCOMMENT
MEDIUMscripts/gh_scripts/issue_comment_bot.py245 # Create the parent messageCOMMENT
Over-Commented Block68 hits · 67 pts
SeverityFileLineSnippetContext
LOWpyproject.toml121 # "EM", # flake8-errmsgCOMMENT
LOWpyproject.toml241# ── Rule Exclusions ──────────────────────────────────────────────────COMMENT
LOWpyproject.toml261# Structure:COMMENT
LOWcompose.near-prod.yaml1##COMMENT
LOWdocker/ol-install-missing-deps.sh1#!/bin/bashCOMMENT
LOWdocker/mockservices/main.py61# IA xauthn (was /internal/fake/xauth in account.py)COMMENT
LOWopenlibrary/asgi_app.py261 # Serve static assets directly from the project static directory.COMMENT
LOWopenlibrary/core/jinja.py101COMMENT
LOWopenlibrary/core/lending.py501 "identifier", # In ?? not editions/works/solrCOMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js41// is non-readable. Requesting `editions` makes the modal match /search exactly.COMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js61const SEARCH_FIELDS = ['key', 'cover_i', 'ia', 'title', 'subtitle', 'author_name', 'author_key', 'first_publish_year', 'COMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js741 // English; the translated set (from the trigger's data-i18n-ui) is setCOMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js1241 // its OL edition page — so the result opens on (and displays) that copyCOMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js1261 const href = display === edition ? edition.key : work.key;COMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js1281 // the work-level aggregate only when no edition was promoted — editionsCOMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js1321 // Cover resolution mirrors the rest of the site (Edition.get_cover_url →COMMENT
LOW…ary/plugins/openlibrary/js/search-modal/SearchModal.js1761COMMENT
LOWopenlibrary/plugins/worksearch/schemes/works.py501 # Local-params syntax (e.g. {!terms f=key}...) isn't a plain field:value pair.COMMENT
LOWopenlibrary/plugins/upstream/borrow.py41# ######### ConstantsCOMMENT
LOWopenlibrary/accounts/model.py1061 # 2. There is an OL account, and it was linked to this IA account at some point,COMMENT
LOWscripts/oldump.sh1#! /bin/bashCOMMENT
LOWscripts/oldump.sh21# The cron job takes 18+ hours to process 192,000,000+ records in 29GB of data!!COMMENT
LOWscripts/install_nginx.sh21COMMENT
LOWscripts/obfi.sh281COMMENT
LOWscripts/make-integration-branch-sample.txt1# This file stores the branches to be merged into `dev-merged` for easy dev.openlibrary.org deployCOMMENT
LOWscripts/fully_reset_environment.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/make-integration-branch.sh1#!/bin/bashCOMMENT
LOWscripts/providers/import_wikisource.py341 if self.page_count:COMMENT
LOWscripts/dev-instance/create-dev-db-pgdump.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/dev-instance/load-patron-data.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/deployment/patch_test_new_memcache_server.sh1#!/bin/bashCOMMENT
LOWscripts/obfi/mktable.py1#!/usr/bin/env python3COMMENT
LOWscripts/monitoring/utils.sh1# Note: The code in here is tested by scripts/monitoring/tests/test_utils_sh.pyCOMMENT
LOWscripts/monitoring/utils.sh61 HTTP_STATUS_COUNTS=$(obfi_in_docker obfi_previous_minute | obfi_top_http_statuses)COMMENT
LOW.github/labeler.yml1# Configurations for the `labeler` GitHub action.COMMENT
LOW.github/workflows/code_review_action.yml21 group: code-review-${{ github.event.pull_request.number || github.event.issue.number || inputs.pr_number }}COMMENT
LOW.github/workflows/pr_autoresponder.yml41 # Pinned deliberately -- do not restore the floating `@v1`. Same upstreamCOMMENT
LOW.github/workflows/issue_enrichment.yml41 #COMMENT
LOW.github/workflows/issue_enrichment.yml81 # requires write access, so it rejects every issue except ones filedCOMMENT
LOWconf/openlibrary.yml181sentry_cron_jobs:COMMENT
LOWconf/solr/conf/protwords.txt1# The ASF licenses this file to You under the Apache License, Version 2.0COMMENT
LOWconf/solr/conf/wordtypes.txt1# Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWconf/solr/conf/synonyms.txt1# The ASF licenses this file to You under the Apache License, Version 2.0COMMENT
LOWconf/solr/conf/stopwords.txt1# Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt1#COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt21#名詞-固有名詞COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt41#COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt61# e.g. それ, ここ, あいつ, あなた, あちこち, いくつ, どこか, なに, みなさん, みんな, わたくし, われわれCOMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt81#名詞-形容動詞語幹COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt101# 上, うち, 内, おり, 折り, かぎり, 限り, きり, っきり, 結果, ころ, 頃, さい, 際, 最中, さなか,COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt121# treated as 助動詞 ("auxiliary verb") in school grammars, and attach to the baseCOMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt141#COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt161#名詞-接尾-形容動詞語幹COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt181#COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt201# prefix-nominal: Prefixes that attach to nouns (including adjective stem forms)COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt221#動詞COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt241#COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt261# e.g. この, その, あの, どの, いわゆる, なんらかの, 何らかの, いろんな, こういう, そういう, ああいう,COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt281#COMMENT
LOWconf/solr/conf/lang/stoptags_ja.txt301# e.g. から, からには, が, けれど, けれども, けど, し, つつ, て, で, と, ところが, どころか, とも, ども,COMMENT
8 more matches not shown…
Modern Structural Boilerplate40 hits · 41 pts
SeverityFileLineSnippetContext
LOWdocker/mockservices/main.py47logger = logging.getLogger(__name__)CODE
LOWopenlibrary/asgi_app.py32def _setup_env() -> None:CODE
LOWopenlibrary/core/likes.py7logger = logging.getLogger(__name__)CODE
LOWopenlibrary/core/yearly_reading_goals.py82 def update_target(cls, username: str, year: int, new_target: int) -> None:CODE
LOWopenlibrary/core/models.py495def update_list_seed_metadata(a: ListSeedMetadata, b: ListSeedMetadata) -> None:CODE
LOWopenlibrary/core/cache.py24__all__ = [CODE
LOWopenlibrary/core/cache.py126 def update_async(self, *args: P.args, **kw: P.kwargs) -> None:CODE
LOWopenlibrary/core/cache.py132 def _update_async_worker(self, *args: P.args, **kw: P.kwargs) -> None:CODE
LOWopenlibrary/core/follows.py9logger = logging.getLogger(__name__)CODE
LOWopenlibrary/core/waitinglist.py228def update_ebook(ebook_key: str, **data) -> None:CODE
LOWopenlibrary/core/waitinglist.py264def update_all_ebooks() -> None:CODE
LOWopenlibrary/core/bookshelves.py20logger = logging.getLogger(__name__)CODE
LOWopenlibrary/core/formats.py10__all__ = ["dump_yaml", "load_yaml"]CODE
LOWopenlibrary/core/helpers.py32__all__ = [CODE
LOWopenlibrary/core/lending.py42logger = logging.getLogger(__name__)CODE
LOWopenlibrary/core/processors/invalidation.py9__all__ = ["InvalidationProcessor"]CODE
LOWopenlibrary/plugins/openlibrary/api.py49logger = logging.getLogger(__name__)CODE
LOWopenlibrary/plugins/worksearch/subjects.py25__all__ = ["SubjectEngine", "get_subject"]CODE
LOWopenlibrary/plugins/upstream/spamcheck.py19def set_spam_words(words: Iterable[str]) -> None:CODE
LOWopenlibrary/plugins/upstream/spamcheck.py24def set_spam_domains(domains: Iterable[str]) -> None:CODE
LOWopenlibrary/plugins/upstream/spamcheck.py29def _update_spam_doc(**kwargs) -> None:CODE
LOWopenlibrary/plugins/upstream/edits.py56 def update_request() -> None:CODE
LOWopenlibrary/plugins/upstream/utils.py629def set_share_links(url: str = "#", title: str = "", view_context: InfogamiContext | None = None) -> None:CODE
LOWopenlibrary/catalog/marc/parse.py664def update_edition(rec: MarcBase, edition: dict[str, Any], func: Callable, field: str) -> None:CODE
LOWopenlibrary/admin/numbers.py21logger = logging.getLogger(__name__)CODE
LOWopenlibrary/admin/stats.py16logger = logging.getLogger(__name__)CODE
LOWopenlibrary/utils/request_context.py176def set_context_from_legacy_web_py() -> None:CODE
LOWopenlibrary/utils/request_context.py206def set_context_from_fastapi(request: Request) -> None:CODE
LOWopenlibrary/utils/processors.py8__all__ = ["RateLimitProcessor"]CODE
LOWopenlibrary/utils/schema.py8__all__ = [CODE
LOWopenlibrary/accounts/__init__.py42 def _set_conn_auth_token(self, token: str | None) -> None:CODE
LOWopenlibrary/accounts/model.py308 def update_password(self, new_password) -> None:CODE
LOWopenlibrary/accounts/model.py311 def update_email(self, email) -> None:CODE
LOWopenlibrary/accounts/model.py431 def set_bot_flag(self, flag) -> None:CODE
LOWopenlibrary/fastapi/auth.py22logger = logging.getLogger(__name__)CODE
LOWopenlibrary/data/db.py33__all__ = [CODE
LOWopenlibrary/coverstore/coverlib.py20__all__ = ["read_file", "read_image", "save_image"]CODE
LOWopenlibrary/coverstore/oldb.py11__all__ = ["get", "query"]CODE
LOWscripts/providers/isbndb.py178def update_state(logfile: str, fname: str, line_num: int = 0) -> None:CODE
LOWscripts/obfi/mktable.py45 def set_db(self) -> None:CODE
Redundant / Tautological Comments21 hits · 30 pts
SeverityFileLineSnippetContext
LOWcompose.production.yaml316 # Set it to something so that it never starts by default ; we have toCOMMENT
LOWopenlibrary/conftest.py62 # Set infobase_parameters to use local connection instead of OLConnectionSTRING
LOWopenlibrary/catalog/utils/__init__.py515 # Check if it's a 2-letter code, eg enCOMMENT
LOWopenlibrary/catalog/utils/__init__.py517 # Check if it's a full name, eg English, Anglais, etcCOMMENT
LOWopenlibrary/tests/fastapi/test_account.py107 # Check if the set-cookie header deletes "pending_action"COMMENT
LOWopenlibrary/solr/updater/edition.py184 # Check if plain string firstCOMMENT
LOWopenlibrary/accounts/model.py1073 # Check if it is linked already, i.e. has an itemname set. We alreadyCOMMENT
LOWopenlibrary/coverstore/archive.py455 # Set compression to ZIP_STORED to avoid compressionCOMMENT
LOWscripts/obfi.sh252 # Check if in the futureCOMMENT
LOWscripts/obfi.sh264 # Check if the TS is after the start of the log file, which is all that's neededCOMMENT
LOWscripts/obfi.sh275 # Check if in the range of the current log fileCOMMENT
LOWscripts/obfi.sh592 # Check if already running using psCOMMENT
LOWscripts/obfi.sh612 # Check if already running using psCOMMENT
LOWscripts/build_pwa.sh4# Check if git is installedCOMMENT
LOWscripts/providers/import_wikisource.py213 # Check if book description contains a page range. These are generally articlesCOMMENT
LOWscripts/solr_builder/utils.sh24 # Check if '.' in hostCOMMENT
LOWscripts/solr_builder/dump-solr.sh61# Check if enough disk spaceCOMMENT
LOWscripts/deployment/patchdeploy.sh5# Check if PR number is providedCOMMENT
LOWscripts/deployment/deploy.sh48# Check if jq is installedCOMMENT
LOWscripts/deployment/deploy.sh76 # Check if any critical cron jobs are running:COMMENT
LOWscripts/deployment/deploy.sh312 # Check if MacCOMMENT
Structural Annotation Overuse16 hits · 26 pts
SeverityFileLineSnippetContext
LOWtests/unit/js/my-books.test.js126 // Step 1: Check in — stores the event id from the responseCOMMENT
LOWtests/unit/js/my-books.test.js130 // Step 2: Dispatch delete event — triggers DELETE /check-ins/<id>COMMENT
LOWtests/unit/js/my-books.test.js135 // Step 3: Verify the DELETE was sent to the correct URLCOMMENT
LOWscripts/fully_reset_environment.sh12# WARNING: This is destructive. All local volumes and databases will be wiped.COMMENT
LOW.github/workflows/issue_enrichment.md33## Step 1: Fetch issue dataCOMMENT
LOW.github/workflows/issue_enrichment.md45## Step 2: Skip checksCOMMENT
LOW.github/workflows/issue_enrichment.md52## Step 3: Read the entire threadCOMMENT
LOW.github/workflows/issue_enrichment.md70## Step 4: Assess the issue templateCOMMENT
LOW.github/workflows/issue_enrichment.md84## Step 5: Research the codebaseCOMMENT
LOW.github/workflows/issue_enrichment.md162## Step 6: Assess and apply labelsCOMMENT
LOW.github/workflows/issue_enrichment.md210## Step 7: Write and post the commentCOMMENT
LOW.github/workflows/pr_autoresponder.md29## Step 1: Fetch PR dataCOMMENT
LOW.github/workflows/pr_autoresponder.md42## Step 2: Skip checksCOMMENT
LOW.github/workflows/pr_autoresponder.md48## Step 3: Gather queue-position signalsCOMMENT
LOW.github/workflows/pr_autoresponder.md61## Step 4: Assign an initial reviewerCOMMENT
LOW.github/workflows/pr_autoresponder.md80## Step 5: Write and post the commentCOMMENT
AI Structural Patterns20 hits · 20 pts
SeverityFileLineSnippetContext
LOWopenlibrary/asgi_app.py117CODE
LOWopenlibrary/asgi_app.py255CODE
LOWopenlibrary/plugins/books/readlinks.py245CODE
LOWopenlibrary/plugins/worksearch/code.py338CODE
LOWopenlibrary/plugins/worksearch/code.py486CODE
LOWopenlibrary/plugins/worksearch/code.py1208CODE
LOWopenlibrary/plugins/worksearch/code.py1059CODE
LOWopenlibrary/plugins/upstream/yearly_reading_goals.py29CODE
LOWopenlibrary/plugins/upstream/checkins.py53CODE
LOWopenlibrary/plugins/upstream/account.py621CODE
LOWopenlibrary/tests/fastapi/test_account.py14CODE
LOWopenlibrary/utils/solr.py138CODE
LOWopenlibrary/solr/update.py161CODE
LOWopenlibrary/fastapi/internal/api.py500CODE
LOWscripts/copydocs.py326CODE
LOWscripts/utils/scheduler.py28CODE
LOWscripts/solr_builder/solr_builder/solr_builder.py37CODE
LOWscripts/solr_builder/solr_builder/solr_builder.py385CODE
LOWscripts/solr_builder/solr_builder/solr_builder.py463CODE
LOWscripts/solr_updater/solr_updater.py249CODE
Fake / Example Data16 hits · 20 pts
SeverityFileLineSnippetContext
LOWopenlibrary/plugins/openlibrary/js/autocomplete.js161 * <input class="ac-input__visible" type="text" name="fake_name--0" value="Author 1" />COMMENT
LOWopenlibrary/plugins/worksearch/tests/test_subjects.py220 cached = [{"key": "/authors/OL2A", "name": "Jane Doe", "representative_work": None}]CODE
LOWopenlibrary/plugins/upstream/tests/test_account.py576 assert account._mask_email("alice@example.org") == "al***@example.org"CODE
LOWopenlibrary/tests/core/test_lists_engine.py18 "subject_people": ["Jane Doe", {"name": "ignored"}],CODE
LOWopenlibrary/tests/fastapi/conftest.py42 fake_user = AuthenticatedUser(CODE
LOWopenlibrary/tests/fastapi/conftest.py47 fastapi_client.app.dependency_overrides[require_authenticated_user] = lambda: fake_userCODE
LOWopenlibrary/tests/fastapi/conftest.py48 yield fake_userCODE
LOWopenlibrary/tests/fastapi/conftest.py61 fake_user = AuthenticatedUser(CODE
LOWopenlibrary/tests/fastapi/conftest.py66 fastapi_client.app.dependency_overrides[get_authenticated_user] = lambda: fake_userCODE
LOWopenlibrary/tests/fastapi/conftest.py67 yield fake_userCODE
LOWscripts/import_bookdash.py71 """Strips a trailing role annotation, e.g. "Jane Doe(Illustrator)" -> "Jane Doe"."""STRING
LOWscripts/dev-instance/patron_data.sql122INSERT INTO public.data (thing_id, revision, data) VALUES ((SELECT id FROM public.thing WHERE key = '/people/openlibraryCODE
LOWscripts/dev-instance/patron_data.sql122INSERT INTO public.data (thing_id, revision, data) VALUES ((SELECT id FROM public.thing WHERE key = '/people/openlibraryCODE
LOWscripts/tests/test_detect_missing_i18n.py27 assert check_html("<p>Lorem ipsum dolor sit amet</p>") == []CODE
LOWscripts/tests/test_detect_missing_i18n.py27 assert check_html("<p>Lorem ipsum dolor sit amet</p>") == []CODE
LOWscripts/tests/test_import_bookdash.py71 assert strip_author_role("Jane Doe") == "Jane Doe"STRING
Verbosity Indicators3 hits · 7 pts
SeverityFileLineSnippetContext
LOWtests/unit/js/my-books.test.js126 // Step 1: Check in — stores the event id from the responseCOMMENT
LOWtests/unit/js/my-books.test.js130 // Step 2: Dispatch delete event — triggers DELETE /check-ins/<id>COMMENT
LOWtests/unit/js/my-books.test.js135 // Step 3: Verify the DELETE was sent to the correct URLCOMMENT
AI Slop Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMopenlibrary/core/imports.py387 # so this stays robust even if a future caller forwards user input as theSTRING
MEDIUMopenlibrary/components/HelloWorld.vue55 // Essentially gettersCOMMENT
LOWscripts/affiliate_server.py620 # TODO: Any point in having option not to stage and just return metadata?COMMENT
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHopenlibrary/core/auth.py32 Verify an HMAC digest against a message with timestamp validation. This method validates that the provSTRING
AI Response Leakage1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHopenlibrary/plugins/README.md54The following example from [plugins/openlibrary/api.py](https://github.com/internetarchive/openlibrary/blob/master/openlCODE
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOWopenlibrary/tests/core/test_vendors.py91 # TODO: implement and test edition numberCOMMENT
LOWopenlibrary/tests/core/test_vendors.py142 # TODO: implement and test edition numberCOMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/code_review_action.yml27 # Placeholder scaffold for #13163 -- trigger wiring only, no review logic yet.COMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWscripts/make-integration-branch.sh6# Usage:COMMENT