AI Slop Code Risk Monitor

tortoise/tortoise-orm

SlopCodeMonitor badge for tortoise/tortoise-orm Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).
35.9 High pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for tortoise/tortoise-orm. SynthScan examined 61,240 lines of code across 364 source files, recording 1463 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 35.9 (High 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.

35.9
Adjusted Signal
35.9
Raw Pattern Score
100%
Time Factor
—
Last Push
—
Stars
—
Language
61.2K
Lines of Code
364
Files
1.5K
Pattern Hits
2026-10-31
Scan Date
0.18
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 59.9/100 · HIGH

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

Hallucinated Dependency & Supply Chain Risk 17.0/100 · LOW

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

Agent Over-Engineering Ratio 78.3/100 · CRITICAL

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

PR Review Velocity Impact 82.6/100 · CRITICAL

Which changes need focused human review? 1463 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

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

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 3HIGH 63MEDIUM 169LOW 1228

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 1463 distinct pattern matches across 19 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 Identifiers981 hits · 1010 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_query_api.py159async def test_execute_pypika_invalid_schema_raises(query_api_db) -> None:CODE
LOW⚡tests/test_query_api.py277async def test_execute_pypika_explicit_connection_with_multiple_configured() -> None:CODE
LOW⚡tests/test_query_api.py287 async def execute_query_dict_with_affected(self, query, values=None):CODE
LOWtests/test_query_api.py67async def test_execute_pypika_metadata(query_api_db) -> None:CODE
LOWtests/test_query_api.py77async def test_execute_pypika_update_rows_affected(query_api_db) -> None:CODE
LOWtests/test_query_api.py88async def test_execute_pypika_insert_rows_affected(query_api_db) -> None:CODE
LOWtests/test_query_api.py99async def test_query_parameterization(query_api_db) -> None:CODE
LOWtests/test_query_api.py111async def test_execute_pypika_pydantic_schema(query_api_db) -> None:CODE
LOWtests/test_query_api.py122async def test_execute_pypika_pydantic_type_adapter(query_api_db) -> None:CODE
LOWtests/test_query_api.py136async def test_execute_pypika_typed_dict_schema(query_api_db) -> None:CODE
LOWtests/test_query_api.py148async def test_execute_pypika_empty_result(query_api_db) -> None:CODE
LOWtests/test_query_api.py211async def test_rows_affected_select_sqlite(rows_affected_setup) -> None:CODE
LOWtests/test_query_api.py220async def test_rows_affected_select_asyncpg(rows_affected_setup) -> None:CODE
LOWtests/test_query_api.py232async def test_rows_affected_select_driver_rowcount(rows_affected_setup) -> None:CODE
LOWtests/test_query_api.py247async def test_rows_affected_update(rows_affected_setup) -> None:CODE
LOWtests/test_query_api.py259async def test_rows_affected_delete(rows_affected_setup) -> None:CODE
LOWtests/test_query_api.py340async def test_execute_pypika_requires_connection_with_multiple_configured(multi_db) -> None:CODE
LOWtests/test_query_api.py350async def test_subquery_params_inline(query_api_db) -> None:CODE
LOW⚡tests/test_concurrency.py18async def test_concurrency_read_isolated(db_isolated) -> None:CODE
LOW⚡tests/test_concurrency.py27async def test_concurrency_create_isolated(db_isolated) -> None:CODE
LOW⚡tests/test_concurrency.py35async def test_nonconcurrent_get_or_create_isolated(db_isolated) -> None:CODE
LOW⚡tests/test_concurrency.py299async def test_concurrency_read_transactioned(db) -> None:CODE
LOW⚡tests/test_concurrency.py309async def test_concurrency_create_transactioned(db) -> None:CODE
LOW⚡tests/test_concurrency.py318async def test_nonconcurrent_get_or_create_transactioned(db) -> None:CODE
LOW⚡tests/test_concurrency.py334async def test_concurrent_queries_lazy_init(db_isolated) -> None:CODE
LOWtests/test_concurrency.py53async def test_concurrent_create_applies_defaults(CODE
LOWtests/test_concurrency.py61 async def synchronized_create_or_get(CODE
LOWtests/test_concurrency.py108async def test_update_or_create_refreshes_after_create_race(db_isolated, monkeypatch) -> None:CODE
LOWtests/test_concurrency.py132async def test_update_or_create_retries_deleted_race_winner(db_isolated, monkeypatch) -> None:CODE
LOWtests/test_concurrency.py159async def test_update_or_create_updates_recreated_race_winner(db_isolated, monkeypatch) -> None:CODE
LOWtests/test_concurrency.py190async def test_update_or_create_repeated_deletions_terminate(db_isolated, monkeypatch) -> None:CODE
LOWtests/test_concurrency.py218async def test_update_or_create_race_in_existing_transaction(db_isolated, monkeypatch) -> None:CODE
LOWtests/test_concurrency.py241async def test_concurrent_get_or_create_isolated(db_isolated) -> None:CODE
LOWtests/test_concurrency.py252async def test_concurrent_transactions_with_multiple_ops(db_isolated) -> None:CODE
LOWtests/test_concurrency.py266async def test_concurrent_transactions_with_single_op(db_isolated) -> None:CODE
LOWtests/test_concurrency.py280async def test_nested_concurrent_transactions_with_multiple_ops(db_isolated) -> None:CODE
LOWtests/test_concurrency.py347async def test_concurrent_transactions_lazy_init(db_isolated) -> None:CODE
LOWtests/test_group_by.py36async def test_count_group_by_with_join(db, group_by_data):CODE
LOWtests/test_group_by.py49async def test_count_filter_group_by(db, group_by_data):CODE
LOWtests/test_group_by.py76async def test_sum_group_by_with_join(db, group_by_data):CODE
LOWtests/test_group_by.py117async def test_avg_group_by_with_join(db, group_by_data):CODE
LOWtests/test_group_by.py142async def test_count_values_list_group_by(db, group_by_data):CODE
LOWtests/test_group_by.py162async def test_count_values_list_group_by_with_join(db, group_by_data):CODE
LOWtests/test_group_by.py172async def test_count_values_list_filter_group_by(db, group_by_data):CODE
LOWtests/test_group_by.py184async def test_sum_values_list_group_by(db, group_by_data):CODE
LOWtests/test_group_by.py201async def test_sum_values_list_group_by_with_join(db, group_by_data):CODE
LOWtests/test_group_by.py211async def test_sum_values_list_filter_group_by(db, group_by_data):CODE
LOWtests/test_group_by.py223async def test_avg_values_list_group_by(db, group_by_data):CODE
LOWtests/test_group_by.py241async def test_avg_values_list_group_by_with_join(db, group_by_data):CODE
LOWtests/test_group_by.py251async def test_avg_values_list_filter_group_by(db, group_by_data):CODE
LOWtests/test_group_by.py269async def test_group_by_annotate_result(db, group_by_data):CODE
LOWtests/test_group_by.py282async def test_group_by_requiring_nested_joins(db):CODE
LOWtests/test_group_by.py308async def test_group_by_ambigious_column(db):CODE
LOWtests/test_group_by.py328async def test_group_by_nested_column(db):CODE
LOWtests/test_group_by.py353async def test_group_by_id_with_nested_filter(db, group_by_data):CODE
LOWtests/test_group_by.py361async def test_select_subquery_with_group_by(db, group_by_data):CODE
LOW⚡tests/test_f.py68async def test_values_with_json_field_attribute(db):CODE
LOW⚡tests/test_f.py77async def test_values_with_json_field_attribute_of_attribute(db):CODE
LOW⚡tests/test_f.py86async def test_values_with_json_field_str_array_element(db):CODE
LOWtests/test_f.py101async def test_values_with_json_field_array_attribute(db):CODE
921 more matches not shown…
Decorative Section Separators158 hits · 580 pts
SeverityFileLineSnippetContext
MEDIUMconftest.py26# ============================================================================COMMENT
MEDIUMconftest.py28# ============================================================================COMMENT
MEDIUMconftest.py41# ============================================================================COMMENT
MEDIUMconftest.py44# ============================================================================COMMENT
MEDIUMconftest.py179# ============================================================================COMMENT
MEDIUMconftest.py181# ============================================================================COMMENT
MEDIUM⚡tests/test_query_api.py167# =============================================================================COMMENT
MEDIUM⚡tests/test_query_api.py170# =============================================================================COMMENT
MEDIUM⚡tests/test_query_api.py270# =============================================================================COMMENT
MEDIUM⚡tests/test_query_api.py273# =============================================================================COMMENT
MEDIUMtests/test_query_api.py40# =============================================================================COMMENT
MEDIUMtests/test_query_api.py43# =============================================================================COMMENT
MEDIUM⚡tests/test_concurrency.py12# =============================================================================COMMENT
MEDIUM⚡tests/test_concurrency.py14# =============================================================================COMMENT
MEDIUM⚡tests/test_concurrency.py292# =============================================================================COMMENT
MEDIUM⚡tests/test_concurrency.py294# =============================================================================COMMENT
MEDIUM⚡tests/test_concurrency.py327# =============================================================================COMMENT
MEDIUM⚡tests/test_concurrency.py330# =============================================================================COMMENT
MEDIUM⚡tests/test_only.py93# ============================================================================COMMENT
MEDIUM⚡tests/test_only.py95# ============================================================================COMMENT
MEDIUM⚡tests/test_only.py161# ============================================================================COMMENT
MEDIUM⚡tests/test_only.py163# ============================================================================COMMENT
MEDIUM⚡tests/test_only.py217# ============================================================================COMMENT
MEDIUM⚡tests/test_only.py219# ============================================================================COMMENT
MEDIUM⚡tests/test_only.py285# ============================================================================COMMENT
MEDIUM⚡tests/test_only.py287# ============================================================================COMMENT
MEDIUMtests/test_only.py8# ============================================================================COMMENT
MEDIUMtests/test_only.py10# ============================================================================COMMENT
MEDIUMtests/test_only.py25# ============================================================================COMMENT
MEDIUMtests/test_only.py27# ============================================================================COMMENT
MEDIUMtests/test_only.py271# ============================================================================COMMENT
MEDIUMtests/test_only.py273# ============================================================================COMMENT
MEDIUMtests/test_q.py10# =============================================================================COMMENT
MEDIUMtests/test_q.py12# =============================================================================COMMENT
MEDIUMtests/test_q.py166# =============================================================================COMMENT
MEDIUMtests/test_q.py168# =============================================================================COMMENT
MEDIUM⚡tests/test_truncate.py13# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_truncate.py15# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_truncate.py71# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_truncate.py73# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py22# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py24# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py55# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py57# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py90# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py92# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py130# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py132# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py192# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py194# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py224# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py226# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py246# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py248# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py268# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_construct.py270# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_model_construct.py162# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_model_construct.py164# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_model_construct.py176# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_model_construct.py178# ---------------------------------------------------------------------------COMMENT
98 more matches not shown…
Empty Error Handlers33 hits · 165 pts
SeverityFileLineSnippetContext
HIGHconftest.py22except ImportError:CODE
HIGHtests/test_transactions.py296except KeyError:CODE
HIGHtests/test_transactions.py326except KeyError:CODE
HIGHtests/test_transactions.py356except KeyError:CODE
HIGHtests/test_transactions.py385except KeyError:CODE
HIGHtests/test_manual_sql.py34except ValueError:CODE
HIGHtests/test_manual_sql.py61except ValueError:CODE
HIGHtests/backends/test_mysql.py64except ImportError:CODE
HIGHtests/backends/test_mysql.py92except ConnectionError:CODE
HIGHdocs/sphinx_autodoc_typehints.py211except (AttributeError, TypeError, RecursionError):CODE
HIGHdocs/sphinx_autodoc_typehints.py235except (AttributeError, TypeError):CODE
HIGHdocs/sphinx_autodoc_typehints.py43except TypeError:CODE
HIGHdocs/sphinx_autodoc_typehints.py136except TypeError:CODE
HIGHexamples/transactions.py33except OperationalError:CODE
HIGHexamples/transactions.py48except OperationalError:CODE
HIGHexamples/relations.py86except NoValuesFetched:CODE
HIGHtortoise/models.py1314except DoesNotExist:CODE
HIGHtortoise/validators.py344except ValidationError:CODE
HIGHtortoise/router.py24except AttributeError:CODE
HIGHtortoise/backends/asyncpg/client.py102except asyncpg.InvalidCatalogNameError: # pragma: nocoverageCODE
HIGHtortoise/backends/sqlite/client.py115except FileNotFoundError: # pragma: nocoverageCODE
HIGHtortoise/backends/mysql/client.py177except errors.DatabaseError: # pragma: nocoverageCODE
HIGHtortoise/backends/psycopg/client.py146except psycopg.errors.InvalidCatalogName: # pragma: nocoverageCODE
HIGHtortoise/backends/base/schema_generator.py406except NotImplementedError:CODE
HIGHtortoise/backends/base/schema_generator.py416except NotImplementedError:CODE
HIGHtortoise/cli/utils.py177except (ModuleNotFoundError, AttributeError, ValueError):CODE
HIGHtortoise/contrib/pylint/__init__.py136except AstroidError:CODE
HIGHtortoise/contrib/pylint/__init__.py59except AttributeError:CODE
HIGHtortoise/contrib/pydantic/utils.py29except Exception: # nosec B110CODE
HIGHtortoise/fields/base.py440except AttributeError:CODE
HIGHtortoise/fields/base.py386except TypeError:CODE
HIGHtortoise/fields/base.py506except (AttributeError, TypeError):CODE
HIGHtortoise/fields/data.py89except ImportError: # pragma: nocoverageCODE
Unused Imports165 hits · 152 pts
SeverityFileLineSnippetContext
LOWtests/test_query_api.py1CODE
LOWtests/test_primary_key.py1CODE
LOWtests/test_signals.py1CODE
LOWtests/test_update.py1CODE
LOWtests/backends/test_mysql.py60CODE
LOWtests/utils/fake_client.py1CODE
LOWtests/utils/test_describe_model.py1CODE
LOWtests/model_setup/model_bad_rel2.py6CODE
LOWtests/cli/test_cli.py1CODE
LOWtests/schema/models_m2m_2.py5CODE
LOWtests/schema/models_fk_1.py5CODE
LOWtests/benchmarks/conftest.py1CODE
LOWtests/fields/test_db_index.py1CODE
LOWtests/fields/test_db_default.py1CODE
LOWtests/fields/subclass_fields.py1CODE
LOWdocs/type_globals.py1CODE
LOWdocs/type_globals.py2CODE
LOWdocs/type_globals.py3CODE
LOWexamples/signals.py5CODE
LOWexamples/comprehensive_migrations_project/models.py8CODE
LOWexamples/schema_migrations_project/models.py14CODE
LOWexamples/migrations_project/models.py1CODE
LOWexamples/blacksheep/server.py2CODE
LOWexamples/fastapi/schemas.py1CODE
LOWexamples/multiapp_migrations_project/catalog/models.py1CODE
LOWexamples/multiapp_migrations_project/accounts/models.py1CODE
LOWexamples/multiapp_migrations_project/orders/models.py1CODE
LOWtortoise/signals.py1CODE
LOWtortoise/config.py1CODE
LOWtortoise/models.py1CODE
LOWtortoise/transactions.py1CODE
LOWtortoise/validators.py1CODE
LOWtortoise/__init__.py1CODE
LOWtortoise/__init__.py17CODE
LOWtortoise/__init__.py17CODE
LOWtortoise/__init__.py17CODE
LOWtortoise/__init__.py17CODE
LOWtortoise/__init__.py17CODE
LOWtortoise/apps.py1CODE
LOWtortoise/apps.py16CODE
LOWtortoise/apps.py16CODE
LOWtortoise/connection.py1CODE
LOWtortoise/context.py19CODE
LOWtortoise/indexes.py1CODE
LOWtortoise/utils.py1CODE
LOWtortoise/schema_quoting.py9CODE
LOWtortoise/query_api.py1CODE
LOWtortoise/exceptions.py1CODE
LOWtortoise/converters.py1CODE
LOWtortoise/router.py1CODE
LOWtortoise/timezone.py1CODE
LOWtortoise/manager.py1CODE
LOWtortoise/query_utils.py1CODE
LOWtortoise/filters.py1CODE
LOWtortoise/backends/asyncpg/client.py1CODE
LOWtortoise/backends/asyncpg/schema_generator.py1CODE
LOWtortoise/backends/asyncpg/executor.py1CODE
LOWtortoise/backends/oracle/client.py1CODE
LOWtortoise/backends/oracle/schema_generator.py1CODE
LOWtortoise/backends/oracle/executor.py1CODE
105 more matches not shown…
Cross-File Repetition16 hits · 80 pts
SeverityFileLineSnippetContext
HIGHtests/model_setup/model_bad_rel8.py0testing models for a bad/wrong relation reference wrong reference. fk field parameter `to_field` with non exist field.STRING
HIGHtests/model_setup/model_bad_rel9.py0testing models for a bad/wrong relation reference wrong reference. fk field parameter `to_field` with non exist field.STRING
HIGHtests/model_setup/model_bad_rel6.py0testing models for a bad/wrong relation reference wrong reference. fk field parameter `to_field` with non exist field.STRING
HIGHtests/model_setup/model_bad_rel7.py0testing models for a bad/wrong relation reference wrong reference. fk field parameter `to_field` with non exist field.STRING
HIGHtests/model_setup/test_init.py0helper to reset tortoise state before each test. note: we must not set tortoise.apps = none or tortoise._inited = false STRING
HIGHtests/model_setup/test_bad_relation_reference.py0helper to reset tortoise state before each test. note: we must not set tortoise.apps = none or tortoise._inited = false STRING
HIGHtests/schema/test_generate_schema.py0helper to reset tortoise state before each test. note: we must not set tortoise.apps = none or tortoise._inited = false STRING
HIGHtests/schema/models_no_auto_create_m2m.py0this example demonstrates sql schema generation for each db type supported.STRING
HIGHtests/schema/models_schema_create.py0this example demonstrates sql schema generation for each db type supported.STRING
HIGHexamples/schema_create.py0this example demonstrates sql schema generation for each db type supported.STRING
HIGHtortoise/contrib/aiohttp/__init__.py0registers tortoise-orm with set-up at the beginning of fastapi application's lifespan (which allow user to read/write daSTRING
HIGHtortoise/contrib/quart/__init__.py0registers tortoise-orm with set-up at the beginning of fastapi application's lifespan (which allow user to read/write daSTRING
HIGHtortoise/contrib/starlette/__init__.py0registers tortoise-orm with set-up at the beginning of fastapi application's lifespan (which allow user to read/write daSTRING
HIGHtortoise/contrib/blacksheep/__init__.py0registers tortoise-orm with set-up at the beginning of fastapi application's lifespan (which allow user to read/write daSTRING
HIGHtortoise/contrib/fastapi/__init__.py0registers tortoise-orm with set-up at the beginning of fastapi application's lifespan (which allow user to read/write daSTRING
HIGHtortoise/contrib/sanic/__init__.py0registers tortoise-orm with set-up at the beginning of fastapi application's lifespan (which allow user to read/write daSTRING
Cross-Language Confusion9 hits · 42 pts
SeverityFileLineSnippetContext
HIGH⚡tests/test_source_field.py267 assert {(o.chars, o.null) for o in objs} == {("aaa", "null"), ("bbb", "null")}CODE
HIGHtortoise/functions.py32 Provides a default value if field is null.STRING
HIGHtortoise/apps.py228 null=fk_object.null,CODE
HIGHtortoise/contrib/pydantic/creator.py509 if not field.pk and (field_name in self._optional or field.null):CODE
HIGHtortoise/fields/relational.py366 super().__init__(field_type, null=null, **kwargs)CODE
HIGHtortoise/fields/relational.py523 to, related_name, on_delete, db_constraint=db_constraint, null=null, **kwargsCODE
HIGHtortoise/fields/relational.py598 to, related_name, on_delete, db_constraint=db_constraint, null=null, **kwargsCODE
HIGHtortoise/fields/base.py479 "default": ... # The default value (coerced to int/float/str/bool/null)STRING
HIGHtortoise/fields/base.py536 "nullable": self.null,CODE
Deep Nesting33 hits · 32 pts
SeverityFileLineSnippetContext
LOWtests/test_concurrency.py53CODE
LOWtests/test_default.py28CODE
LOWdocs/sphinx_autodoc_typehints.py22CODE
LOWdocs/sphinx_autodoc_typehints.py156CODE
LOWdocs/sphinx_autodoc_typehints.py335CODE
LOWdocs/sphinx_autodoc_typehints.py358CODE
LOWtortoise/models.py511CODE
LOWtortoise/models.py641CODE
LOWtortoise/models.py746CODE
LOWtortoise/models.py782CODE
LOWtortoise/models.py825CODE
LOWtortoise/models.py954CODE
LOWtortoise/models.py1135CODE
LOWtortoise/expressions.py126CODE
LOWtortoise/apps.py126CODE
LOWtortoise/queryset.py219CODE
LOWtortoise/queryset.py2285CODE
LOWtortoise/backends/sqlite/client.py200CODE
LOWtortoise/backends/sqlite/executor.py67CODE
LOWtortoise/backends/mysql/client.py111CODE
LOWtortoise/backends/base/client.py373CODE
LOWtortoise/backends/base/executor.py110CODE
LOWtortoise/backends/base/executor.py651CODE
LOWtortoise/cli/cli.py211CODE
LOWtortoise/cli/cli.py373CODE
LOWtortoise/cli/cli.py493CODE
LOWtortoise/cli/cli.py506CODE
LOWtortoise/cli/utils.py167CODE
LOWtortoise/contrib/pylint/__init__.py36CODE
LOWtortoise/contrib/test/__init__.py69CODE
LOWtortoise/contrib/test/__init__.py121CODE
LOWtortoise/contrib/pydantic/creator.py326CODE
LOWtortoise/contrib/pydantic/base.py20CODE
Hallucination Indicators3 hits · 30 pts
SeverityFileLineSnippetContext
CRITICALtortoise/expressions.py366 resolve_context.model._meta.db.executor_class.get_overridden_filter_func(CODE
CRITICALtortoise/queryset.py183 wrapped = self.model._meta.db.query_class.from_(inner.as_(alias)).select(CODE
CRITICALtortoise/queryset.py1488 self.query = self.model._meta.db.query_class.from_(table).where(CODE
Self-Referential Comments8 hits · 26 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_context.py520 # Create a recordCOMMENT
MEDIUMexamples/pydantic/tutorial_2.py25 # Define the default orderingCOMMENT
MEDIUMexamples/pydantic/tutorial_2.py30# Create a list of models for population from a queryset.COMMENT
MEDIUMtortoise/indexes.py68 # This function is required by aerichCOMMENT
MEDIUMtortoise/indexes.py74 # This function is required by aerichCOMMENT
MEDIUM⚡tortoise/backends/base/schema_generator.py107 # This method provides a mechanism where you can perform a set ofCOMMENT
MEDIUMtortoise/backends/base/schema_generator.py126 # This method provides a default method to escape comment strings as perCOMMENT
MEDIUMtortoise/backends/base/config_generator.py129# Create an alias for backwards compatibilityCOMMENT
Docstring Block Structure5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHtortoise/config.py221 Load configuration from a YAML or JSON file. Args: config_file (str): Path to the configurSTRING
HIGHtortoise/config.py252 Create a TortoiseConfig instance using a database URL and app modules mapping. This factory method buiSTRING
HIGHtortoise/config.py281 Parse and resolve multiple configuration argument sources into a unified TortoiseConfig instance. AcceSTRING
HIGHtortoise/context.py380 Retrieve a model by app label and model name. Args: app_label: The app label (e.g., "modelSTRING
HIGHtortoise/context.py400 Get a database connection by name. Args: connection_name: The connection alias. If None, uSTRING
Excessive Try-Catch Wrapping17 hits · 17 pts
SeverityFileLineSnippetContext
LOWdocs/sphinx_autodoc_typehints.py56 except Exception:CODE
LOWdocs/sphinx_autodoc_typehints.py59 except Exception:CODE
LOWdocs/sphinx_autodoc_typehints.py218 except Exception as exc:CODE
LOWdocs/sphinx_autodoc_typehints.py240 except Exception:CODE
LOWtortoise/__init__.py459 except Exception as e:CODE
LOWtortoise/context.py351 except Exception:CODE
LOWtortoise/query_api.py26except Exception: # pragma: nocoverageCODE
LOWtortoise/query_api.py34except Exception: # pragma: nocoverageCODE
LOWtortoise/backends/asyncpg/client.py125 except Exception:CODE
LOWtortoise/backends/sqlite/client.py141 except Exception:CODE
LOWtortoise/backends/odbc/client.py131 except Exception:CODE
LOWtortoise/backends/mysql/client.py204 except Exception:CODE
LOWtortoise/cli/utils.py86 except Exception as exc:CODE
LOWtortoise/contrib/pydantic/utils.py29 except Exception: # nosec B110CODE
LOWtortoise/contrib/pydantic/utils.py33 except Exception:CODE
LOWtortoise/fields/data.py792 except Exception as e:CODE
LOWtortoise/fields/data.py812 except Exception as e:CODE
Modern Structural Boilerplate11 hits · 11 pts
SeverityFileLineSnippetContext
LOWtests/test_concurrency.py200 async def update_during_churn() -> None:CODE
LOWdocs/sphinx_autodoc_typehints.py17logger = logging.getLogger(__name__)CODE
LOWtortoise/models.py893 def _set_pk_val(self, value: Any) -> None:CODE
LOWtortoise/models.py1102 async def _set_async_default_field(self) -> None:CODE
LOWtortoise/__init__.py589__all__ = [CODE
LOWtortoise/connection.py68 def _set_storage(self, new_storage: dict[str, BaseDBAsyncClient]) -> None:CODE
LOWtortoise/context.py71def set_global_context(ctx: TortoiseContext) -> None:CODE
LOWtortoise/context.py561__all__ = [CODE
LOWtortoise/cli/__init__.py3__all__ = ["main"]CODE
LOWtortoise/fields/__init__.py44__all__ = [CODE
LOWtortoise/fields/relational.py154 def _set_result_for_query(self, sequence: list[MODEL], attr: str | None = None) -> None:CODE
AI Structural Patterns10 hits · 10 pts
SeverityFileLineSnippetContext
LOWtortoise/__init__.py277CODE
LOWtortoise/context.py239CODE
LOWtortoise/backends/base/client.py70CODE
LOWtortoise/contrib/starlette/__init__.py22CODE
LOWtortoise/contrib/postgres/search.py333CODE
LOWtortoise/contrib/fastapi/__init__.py119CODE
LOWtortoise/contrib/pydantic/creator.py612CODE
LOWtortoise/contrib/pydantic/creator.py189CODE
LOWtortoise/fields/base.py220CODE
LOWtortoise/fields/data.py926CODE
Slop Phrases2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMexamples/enum_fields.py30 # also you can use valid int and str value directlyCOMMENT
MEDIUMexamples/enum_fields.py42 # also you can use valid int and str value directlyCOMMENT
Fake / Example Data3 hits · 4 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_validators.py244 "user@example.com",CODE
LOW⚡tests/test_validators.py261 validator("user@example.com")CODE
LOW⚡tests/test_validators.py266 validator("user@example.com")CODE
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippetContext
LOWdocs/conf.py1#COMMENT
LOWdocs/conf.py181# The name for this set of Sphinx documents. If None, it defaults toCOMMENT
LOWdocs/conf.py201# The default sidebars (for documents that don't match any pattern) areCOMMENT
LOWdocs/conf.py221 # The font size ('10pt', '11pt' or '12pt').COMMENT
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWconftest.py90 # Check if the database supports transactionsCOMMENT
LOWtests/contrib/test_decorator.py15 # Set PYTHONPATH to use local source instead of installed packageCOMMENT
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_source_field.py234 async def test_function(self, db):CODE
LOWtortoise/__init__.py552 async def do_stuff():STRING
AI Slop Vocabulary1 hit · 1 pts
SeverityFileLineSnippetContext
MEDIUMtortoise/backends/base/client.py308 """Wraps the connections with a lock to facilitate safe concurrent access when usingSTRING