AI Slop Code RIsk Monitor

fastapi/fastapi

FastAPI framework, high performance, easy to learn, fast to code, ready for production

6.7 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for fastapi/fastapi, a Python project with 102,970 GitHub stars. SynthScan examined 379,944 lines of code across 2932 source files, recording 2006 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 6.7 (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.

6.7
Adjusted Signal
6.7
Raw Pattern Score
100%
Time Factor
2026-10-08
Last Push
103.0K
Stars
Python
Language
379.9K
Lines of Code
2.9K
Files
2.0K
Pattern Hits
2026-10-12
Scan Date
0.01
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 20.6/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 3.5/100 · LOW

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

Agent Over-Engineering Ratio 25.4/100 · MEDIUM

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

PR Review Velocity Impact 27.4/100 · MEDIUM

Which changes need focused human review? 2006 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 0HIGH 41MEDIUM 113LOW 1852

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 2006 distinct pattern matches across 18 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 Identifiers1543 hits · 1652 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_datastructures.py16def test_default_placeholder_equals():CODE
LOW⚡tests/test_datastructures.py23def test_default_placeholder_bool():CODE
LOW⚡tests/test_datastructures.py30def test_upload_file_is_closed(tmp_path: Path):CODE
LOWtests/test_starlette_exception.py23async def no_body_status_code_exception():CODE
LOWtests/test_starlette_exception.py28async def no_body_status_code_with_detail_exception():CODE
LOW⚡tests/test_starlette_exception.py61def test_get_starlette_item_not_found():CODE
LOW⚡tests/test_starlette_exception.py68def test_no_body_status_code_exception_handlers():CODE
LOW⚡tests/test_starlette_exception.py74def test_no_body_status_code_with_detail_exception_handlers():CODE
LOWtests/test_multi_body_errors.py40def test_jsonable_encoder_requiring_error():CODE
LOWtests/test_multi_body_errors.py56def test_put_incorrect_body_multiple():CODE
LOW⚡tests/test_security_http_digest_description.py19def test_security_http_digest():CODE
LOW⚡tests/test_security_http_digest_description.py25def test_security_http_digest_no_credentials():CODE
LOW⚡tests/test_security_http_digest_description.py32def test_security_http_digest_incorrect_scheme_credentials():CODE
LOWtests/test_union_body_discriminator_annotated.py48def test_union_body_discriminator_assignment(client: TestClient) -> None:CODE
LOWtests/test_union_body_discriminator_annotated.py54def test_union_body_discriminator_annotated(client: TestClient) -> None:CODE
LOWtests/test_security_oauth2.py64def test_strict_login_no_data():CODE
LOWtests/test_security_oauth2.py91def test_strict_login_no_grant_type():CODE
LOWtests/test_security_oauth2.py114def test_strict_login_incorrect_grant_type(grant_type: str):CODE
LOWtests/test_security_oauth2.py133def test_strict_login_correct_grant_type():CODE
LOW⚡tests/test_security_http_basic_optional.py29def test_security_http_basic_no_credentials():CODE
LOW⚡tests/test_security_http_basic_optional.py35def test_security_http_basic_invalid_credentials():CODE
LOW⚡tests/test_security_http_basic_optional.py44def test_security_http_basic_non_basic_credentials():CODE
LOW⚡tests/test_response_model_invalid.py10def test_invalid_response_model_raises():CODE
LOW⚡tests/test_response_model_invalid.py19def test_invalid_response_model_sub_type_raises():CODE
LOW⚡tests/test_response_model_invalid.py28def test_invalid_response_model_in_responses_raises():CODE
LOW⚡tests/test_response_model_invalid.py37def test_invalid_response_model_sub_type_in_responses_raises():CODE
LOWtests/test_dependency_yield_scope.py54def get_named_regular_func_session(session: SessionFuncDep) -> Any:CODE
LOWtests/test_dependency_yield_scope.py128def get_regular_function_scope(sessions: RegularSessionsDep) -> Any:CODE
LOW⚡tests/test_dependency_yield_scope.py193def test_named_function_scope() -> None:CODE
LOW⚡tests/test_dependency_yield_scope.py201def test_regular_function_scope() -> None:CODE
LOW⚡tests/test_dependency_yield_scope.py209def test_router_level_dep_scope_function() -> None:CODE
LOW⚡tests/test_dependency_yield_scope.py215def test_router_level_dep_scope_request() -> None:CODE
LOW⚡tests/test_dependency_yield_scope.py222def test_app_level_dep_scope_function() -> None:CODE
LOWtests/test_dependency_yield_scope.py235def test_app_level_dep_scope_request() -> None:CODE
LOWtests/test_multi_query_errors.py22def test_multi_query_incorrect():CODE
LOWtests/test_response_change_status_code.py23def test_dependency_set_status_code():CODE
LOW⚡tests/test_forms_from_non_typing_sequences.py25def test_python_list_param_as_form():CODE
LOW⚡tests/test_forms_from_non_typing_sequences.py33def test_python_set_param_as_form():CODE
LOW⚡tests/test_forms_from_non_typing_sequences.py41def test_python_tuple_param_as_form():CODE
LOWtests/test_route_handler_wrapping.py10def test_endpoint_wrapper_does_not_accumulate_across_requests(CODE
LOWtests/test_route_handler_wrapping.py16 def get_request_handler_with_endpoint_wrapper(*args, **kwargs):CODE
LOWtests/test_route_handler_wrapping.py57def test_custom_handlers_are_cached_separately_for_nested_inclusions():CODE
LOWtests/test_route_handler_wrapping.py108def test_cached_handler_uses_live_dependency_overrides_and_route_additions():CODE
LOWtests/test_route_handler_wrapping.py137def test_failed_handler_construction_restores_context_and_can_retry():CODE
LOW⚡tests/test_strict_content_type_app_level.py24def test_default_strict_rejects_no_content_type():CODE
LOW⚡tests/test_strict_content_type_app_level.py29def test_default_strict_accepts_json_content_type():CODE
LOW⚡tests/test_strict_content_type_app_level.py35def test_lax_accepts_no_content_type():CODE
LOW⚡tests/test_strict_content_type_app_level.py41def test_lax_accepts_json_content_type():CODE
LOWtests/test_security_scopes_dont_propagate.py38def test_security_scopes_dont_propagate():CODE
LOWtests/test_default_response_class_router.py202def test_router_b_a_c_override():CODE
LOW⚡tests/test_frontend.py1226def test_check_dir_auto_router_warning_points_to_user_code(monkeypatch, tmp_path: Path):CODE
LOW⚡tests/test_frontend.py1236def test_check_dir_true_fails_in_development(monkeypatch, tmp_path: Path):CODE
LOW⚡tests/test_frontend.py1244def test_check_dir_auto_fails_outside_development(monkeypatch, tmp_path: Path):CODE
LOW⚡tests/test_frontend.py1252def test_check_dir_false_allows_missing_directory_and_fails_on_request(tmp_path: Path):CODE
LOW⚡tests/test_frontend.py1260def test_explicit_fallback_files_fail_clearly_when_missing(monkeypatch, tmp_path: Path):CODE
LOWtests/test_frontend.py37def test_frontend_exact_prefix_path_serves_index(tmp_path: Path):CODE
LOWtests/test_frontend.py49def test_apirouter_frontend_with_router_prefix_and_frontend_subpath(tmp_path: Path):CODE
LOWtests/test_frontend.py63def test_frontend_fallback_rejects_invalid_fallback(tmp_path: Path):CODE
LOWtests/test_frontend.py72def test_index_fallback_ignores_invalid_q_value(tmp_path: Path):CODE
LOWtests/test_frontend.py86def test_frontend_static_files_lookup_errors(monkeypatch, tmp_path: Path):CODE
1483 more matches not shown…
Decorative Section Separators106 hits · 388 pts
SeverityFileLineSnippetContext
MEDIUM⚡…s/test_request_params/test_cookie/test_required_str.py176# =====================================================================================COMMENT
MEDIUM⚡…s/test_request_params/test_cookie/test_required_str.py282# =====================================================================================COMMENT
MEDIUM…s/test_request_params/test_cookie/test_required_str.py12# =====================================================================================COMMENT
MEDIUM…s/test_request_params/test_cookie/test_required_str.py79# =====================================================================================COMMENT
MEDIUM⚡…s/test_request_params/test_cookie/test_optional_str.py150# =====================================================================================COMMENT
MEDIUM⚡…s/test_request_params/test_cookie/test_optional_str.py233# =====================================================================================COMMENT
MEDIUM…s/test_request_params/test_cookie/test_optional_str.py11# =====================================================================================COMMENT
MEDIUM…s/test_request_params/test_cookie/test_optional_str.py72# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_form/test_list.py183# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_form/test_list.py294# =====================================================================================COMMENT
MEDIUMtests/test_request_params/test_form/test_list.py13# =====================================================================================COMMENT
MEDIUMtests/test_request_params/test_form/test_list.py84# =====================================================================================COMMENT
MEDIUM⚡…sts/test_request_params/test_form/test_required_str.py170# =====================================================================================COMMENT
MEDIUM⚡…sts/test_request_params/test_form/test_required_str.py277# =====================================================================================COMMENT
MEDIUM…sts/test_request_params/test_form/test_required_str.py13# =====================================================================================COMMENT
MEDIUM…sts/test_request_params/test_form/test_required_str.py80# =====================================================================================COMMENT
MEDIUM⚡…sts/test_request_params/test_form/test_optional_str.py148# =====================================================================================COMMENT
MEDIUM⚡…sts/test_request_params/test_form/test_optional_str.py231# =====================================================================================COMMENT
MEDIUM…sts/test_request_params/test_form/test_optional_str.py12# =====================================================================================COMMENT
MEDIUM…sts/test_request_params/test_form/test_optional_str.py72# =====================================================================================COMMENT
MEDIUM⚡…ts/test_request_params/test_form/test_optional_list.py158# =====================================================================================COMMENT
MEDIUM⚡…ts/test_request_params/test_form/test_optional_list.py244# =====================================================================================COMMENT
MEDIUM…ts/test_request_params/test_form/test_optional_list.py12# =====================================================================================COMMENT
MEDIUM…ts/test_request_params/test_form/test_optional_list.py77# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_header/test_list.py180# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_header/test_list.py287# =====================================================================================COMMENT
MEDIUMtests/test_request_params/test_header/test_list.py12# =====================================================================================COMMENT
MEDIUMtests/test_request_params/test_header/test_list.py82# =====================================================================================COMMENT
MEDIUM⚡…s/test_request_params/test_header/test_required_str.py170# =====================================================================================COMMENT
MEDIUM⚡…s/test_request_params/test_header/test_required_str.py274# =====================================================================================COMMENT
MEDIUM…s/test_request_params/test_header/test_required_str.py12# =====================================================================================COMMENT
MEDIUM…s/test_request_params/test_header/test_required_str.py78# =====================================================================================COMMENT
MEDIUM⚡…s/test_request_params/test_header/test_optional_str.py147# =====================================================================================COMMENT
MEDIUM⚡…s/test_request_params/test_header/test_optional_str.py228# =====================================================================================COMMENT
MEDIUM…s/test_request_params/test_header/test_optional_str.py11# =====================================================================================COMMENT
MEDIUM…s/test_request_params/test_header/test_optional_str.py71# =====================================================================================COMMENT
MEDIUM⚡…/test_request_params/test_header/test_optional_list.py159# =====================================================================================COMMENT
MEDIUM⚡…/test_request_params/test_header/test_optional_list.py242# =====================================================================================COMMENT
MEDIUM…/test_request_params/test_header/test_optional_list.py11# =====================================================================================COMMENT
MEDIUM…/test_request_params/test_header/test_optional_list.py78# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_file/test_required.py87# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_file/test_required.py188# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_file/test_required.py300# =====================================================================================COMMENT
MEDIUMtests/test_request_params/test_file/test_required.py11# =====================================================================================COMMENT
MEDIUMtests/test_request_params/test_file/test_list.py11# =====================================================================================COMMENT
MEDIUMtests/test_request_params/test_file/test_list.py90# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_file/test_list.py194# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_file/test_list.py309# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_file/test_optional.py79# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_file/test_optional.py165# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_file/test_optional.py256# =====================================================================================COMMENT
MEDIUMtests/test_request_params/test_file/test_optional.py11# =====================================================================================COMMENT
MEDIUM⚡…ts/test_request_params/test_file/test_optional_list.py87# =====================================================================================COMMENT
MEDIUM⚡…ts/test_request_params/test_file/test_optional_list.py179# =====================================================================================COMMENT
MEDIUM⚡…ts/test_request_params/test_file/test_optional_list.py273# =====================================================================================COMMENT
MEDIUM…ts/test_request_params/test_file/test_optional_list.py11# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_body/test_list.py182# =====================================================================================COMMENT
MEDIUM⚡tests/test_request_params/test_body/test_list.py293# =====================================================================================COMMENT
MEDIUMtests/test_request_params/test_body/test_list.py13# =====================================================================================COMMENT
MEDIUMtests/test_request_params/test_body/test_list.py85# =====================================================================================COMMENT
46 more matches not shown…
Unused Imports107 hits · 102 pts
SeverityFileLineSnippetContext
LOWtests/test_security_oauth2.py3CODE
LOWtests/test_stringified_annotation_dependency.py1CODE
LOW…pydanticv2_dataclasses_uuid_stringified_annotations.py1CODE
LOWtests/test_stringified_annotations_simple.py1CODE
LOWfastapi/responses.py5CODE
LOWfastapi/responses.py6CODE
LOWfastapi/responses.py7CODE
LOWfastapi/responses.py9CODE
LOWfastapi/responses.py10CODE
LOWfastapi/responses.py11CODE
LOWfastapi/responses.py12CODE
LOWfastapi/templating.py1CODE
LOWfastapi/websockets.py1CODE
LOWfastapi/websockets.py2CODE
LOWfastapi/websockets.py3CODE
LOWfastapi/concurrency.py8CODE
LOWfastapi/concurrency.py10CODE
LOWfastapi/__init__.py5CODE
LOWfastapi/__init__.py7CODE
LOWfastapi/__init__.py8CODE
LOWfastapi/__init__.py9CODE
LOWfastapi/__init__.py10CODE
LOWfastapi/__init__.py11CODE
LOWfastapi/__init__.py12CODE
LOWfastapi/__init__.py13CODE
LOWfastapi/__init__.py14CODE
LOWfastapi/__init__.py15CODE
LOWfastapi/__init__.py16CODE
LOWfastapi/__init__.py17CODE
LOWfastapi/__init__.py18CODE
LOWfastapi/__init__.py19CODE
LOWfastapi/__init__.py20CODE
LOWfastapi/__init__.py21CODE
LOWfastapi/__init__.py22CODE
LOWfastapi/__init__.py23CODE
LOWfastapi/__init__.py24CODE
LOWfastapi/__init__.py25CODE
LOWfastapi/types.py7CODE
LOWfastapi/staticfiles.py1CODE
LOWfastapi/utils.py23CODE
LOWfastapi/testclient.py1CODE
LOWfastapi/requests.py1CODE
LOWfastapi/requests.py2CODE
LOWfastapi/datastructures.py12CODE
LOWfastapi/datastructures.py13CODE
LOWfastapi/datastructures.py14CODE
LOWfastapi/datastructures.py16CODE
LOWfastapi/datastructures.py17CODE
LOWfastapi/middleware/gzip.py1CODE
LOWfastapi/middleware/cors.py1CODE
LOWfastapi/middleware/__init__.py1CODE
LOWfastapi/middleware/httpsredirect.py1CODE
LOWfastapi/middleware/trustedhost.py1CODE
LOWfastapi/middleware/wsgi.py1CODE
LOWfastapi/security/__init__.py1CODE
LOWfastapi/security/__init__.py2CODE
LOWfastapi/security/__init__.py3CODE
LOWfastapi/security/__init__.py4CODE
LOWfastapi/security/__init__.py5CODE
LOWfastapi/security/__init__.py6CODE
47 more matches not shown…
Fake / Example Data79 hits · 82 pts
SeverityFileLineSnippetContext
LOWtests/test_union_forms.py31 "/form-union/", data={"name": "John Doe", "email": "john@example.com"}CODE
LOWtests/test_union_forms.py35 "received": {"name": "John Doe", "email": "john@example.com"}CODE
LOWtests/test_stringified_annotation_dependency.py16 return ["John Doe", "Jane Doe"]CODE
LOWtests/test_stringified_annotation_dependency.py16 return ["John Doe", "Jane Doe"]CODE
LOWtests/test_stringified_annotation_dependency.py46 assert response.json() == ["John Doe", "Jane Doe"]CODE
LOWtests/test_stringified_annotation_dependency.py46 assert response.json() == ["John Doe", "Jane Doe"]CODE
LOWtests/test_get_model_definitions_formfeed_escape.py32 address=Address(line_1="123 Main St", city="Anytown", state_province="CA"),CODE
LOWtests/test_get_model_definitions_formfeed_escape.py45 "line_1": "123 Main St",CODE
LOW…rial/test_extra_models/test_tutorial001_tutorial002.py32 "full_name": "John Doe",CODE
LOW…rial/test_extra_models/test_tutorial001_tutorial002.py39 "full_name": "John Doe",CODE
LOWtests/test_tutorial/test_settings/test_app01.py26 monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com")CODE
LOWtests/test_tutorial/test_settings/test_app01.py54 "admin_email": "admin@example.com",CODE
LOW⚡tests/test_tutorial/test_settings/test_app03.py28 monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com")CODE
LOW⚡tests/test_tutorial/test_settings/test_app03.py31 assert settings.admin_email == "admin@example.com"CODE
LOW⚡tests/test_tutorial/test_settings/test_app03.py36 monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com")CODE
LOW⚡tests/test_tutorial/test_settings/test_app03.py42 "admin_email": "admin@example.com",CODE
LOWtests/test_tutorial/test_settings/test_tutorial001.py10 monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com")CODE
LOWtests/test_tutorial/test_settings/test_tutorial001.py21 "admin_email": "admin@example.com",CODE
LOWtests/test_tutorial/test_settings/test_app02.py33 monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com")CODE
LOW…ts/test_tutorial/test_python_types/test_tutorial010.py5 assert get_person_name(Person("John Doe")) == "John Doe"CODE
LOW…ts/test_tutorial/test_python_types/test_tutorial011.py22 "id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]",CODE
LOW…rial/test_python_types/test_tutorial001_tutorial002.py18 mock_print.assert_called_with("John Doe")CODE
LOW…tutorial/test_body_multiple_params/test_tutorial002.py33 "user": {"username": "johndoe", "full_name": "John Doe"},CODE
LOW…tutorial/test_body_multiple_params/test_tutorial002.py45 "user": {"username": "johndoe", "full_name": "John Doe"},CODE
LOW⚡…tutorial/test_body_multiple_params/test_tutorial002.py159 "user": {"full_name": "John Doe"},CODE
LOW⚡…tutorial/test_body_multiple_params/test_tutorial002.py166 "input": {"full_name": "John Doe"},CODE
LOWtests/test_tutorial/test_security/test_tutorial002.py36 "full_name": "John Doe",CODE
LOWtests/test_tutorial/test_security/test_tutorial003.py56 "full_name": "John Doe",CODE
LOWtests/test_tutorial/test_security/test_tutorial004.py75 "full_name": "John Doe",CODE
LOWtests/test_tutorial/test_security/test_tutorial005.py96 "full_name": "John Doe",CODE
LOWdocs/zh-hant/docs/features.md55my_user: User = User(id=3, name="John Doe", joined="2018-07-19")CODE
LOWdocs/zh-hant/docs/tutorial/security/oauth2-jwt.md230 "full_name": "John Doe",CODE
LOWdocs/zh-hant/docs/tutorial/security/simple-oauth2.md247 "full_name": "John Doe",CODE
LOWdocs/ja/docs/features.md55my_user: User = User(id=3, name="John Doe", joined="2018-07-19")CODE
LOWdocs/ja/docs/tutorial/security/oauth2-jwt.md230 "full_name": "John Doe",CODE
LOWdocs/ja/docs/tutorial/security/simple-oauth2.md247 "full_name": "John Doe",CODE
LOWdocs/ru/docs/features.md55my_user: User = User(id=3, name="John Doe", joined="2018-07-19")CODE
LOWdocs/ru/docs/tutorial/security/oauth2-jwt.md230 "full_name": "John Doe",CODE
LOWdocs/ru/docs/tutorial/security/simple-oauth2.md231 "full_name": "John Doe",CODE
LOWdocs/pt/docs/features.md55my_user: User = User(id=3, name="John Doe", joined="2018-07-19")CODE
LOWdocs/pt/docs/tutorial/security/oauth2-jwt.md230 "full_name": "John Doe",CODE
LOWdocs/pt/docs/tutorial/security/simple-oauth2.md247 "full_name": "John Doe",CODE
LOWdocs/zh/docs/features.md55my_user: User = User(id=3, name="John Doe", joined="2018-07-19")CODE
LOWdocs/zh/docs/tutorial/security/oauth2-jwt.md230 "full_name": "John Doe",CODE
LOWdocs/zh/docs/tutorial/security/simple-oauth2.md247 "full_name": "John Doe",CODE
LOWdocs/uk/docs/features.md55my_user: User = User(id=3, name="John Doe", joined="2018-07-19")CODE
LOWdocs/uk/docs/tutorial/security/oauth2-jwt.md230 "full_name": "John Doe",CODE
LOWdocs/uk/docs/tutorial/security/simple-oauth2.md247 "full_name": "John Doe",CODE
LOWdocs/hi/docs/features.md55my_user: User = User(id=3, name="John Doe", joined="2018-07-19")CODE
LOWdocs/hi/docs/tutorial/security/oauth2-jwt.md230 "full_name": "John Doe",CODE
LOWdocs/hi/docs/tutorial/security/simple-oauth2.md247 "full_name": "John Doe",CODE
LOWdocs/de/docs/features.md55my_user: User = User(id=3, name="John Doe", joined="2018-07-19")CODE
LOWdocs/de/docs/tutorial/security/oauth2-jwt.md230 "full_name": "John Doe",CODE
LOWdocs/de/docs/tutorial/security/simple-oauth2.md247 "full_name": "John Doe",CODE
LOWdocs/ko/docs/features.md55my_user: User = User(id=3, name="John Doe", joined="2018-07-19")CODE
LOWdocs/ko/docs/tutorial/security/oauth2-jwt.md231 "full_name": "John Doe",CODE
LOWdocs/ko/docs/tutorial/security/simple-oauth2.md247 "full_name": "John Doe",CODE
LOWdocs/fr/docs/features.md55my_user: User = User(id=3, name="John Doe", joined="2018-07-19")CODE
LOWdocs/fr/docs/tutorial/security/oauth2-jwt.md230 "full_name": "John Doe",CODE
LOWdocs/fr/docs/tutorial/security/simple-oauth2.md247 "full_name": "John Doe",CODE
19 more matches not shown…
Cross-File Repetition16 hits · 80 pts
SeverityFileLineSnippetContext
HIGH…m_response/test_tutorial002_tutorial003_tutorial004.py0<html> <head> <title>some html in here</title> </head> <body> <h1>look ma! html!</h1> </body> </html>STRING
HIGHdocs_src/custom_response/tutorial004_py310.py0<html> <head> <title>some html in here</title> </head> <body> <h1>look ma! html!</h1> </body> </html>STRING
HIGHdocs_src/custom_response/tutorial002_py310.py0<html> <head> <title>some html in here</title> </head> <body> <h1>look ma! html!</h1> </body> </html>STRING
HIGHdocs_src/custom_response/tutorial003_py310.py0<html> <head> <title>some html in here</title> </head> <body> <h1>look ma! html!</h1> </body> </html>STRING
HIGH…eration_configurations/test_tutorial003_tutorial004.py0create an item with all the information: - **name**: each item must have a name - **description**: a long description - STRING
HIGH…_src/path_operation_configuration/tutorial005_py310.py0create an item with all the information: - **name**: each item must have a name - **description**: a long description - STRING
HIGH…_src/path_operation_configuration/tutorial004_py310.py0create an item with all the information: - **name**: each item must have a name - **description**: a long description - STRING
HIGH…_operation_advanced_configuration/tutorial004_py310.py0create an item with all the information: - **name**: each item must have a name - **description**: a long description - STRING
HIGHfastapi/security/open_id_connect_url.py0security scheme description. it will be included in the generated openapi (e.g. visible at `/docs`).STRING
HIGHfastapi/security/oauth2.py0security scheme description. it will be included in the generated openapi (e.g. visible at `/docs`).STRING
HIGHfastapi/security/api_key.py0security scheme description. it will be included in the generated openapi (e.g. visible at `/docs`).STRING
HIGHfastapi/security/http.py0security scheme description. it will be included in the generated openapi (e.g. visible at `/docs`).STRING
HIGHdocs_src/request_files/tutorial002_an_py310.py0<body> <form action="/files/" enctype="multipart/form-data" method="post"> <input name="files" type="file" multiple> <inSTRING
HIGHdocs_src/request_files/tutorial003_an_py310.py0<body> <form action="/files/" enctype="multipart/form-data" method="post"> <input name="files" type="file" multiple> <inSTRING
HIGHdocs_src/request_files/tutorial002_py310.py0<body> <form action="/files/" enctype="multipart/form-data" method="post"> <input name="files" type="file" multiple> <inSTRING
HIGHdocs_src/request_files/tutorial003_py310.py0<body> <form action="/files/" enctype="multipart/form-data" method="post"> <input name="files" type="file" multiple> <inSTRING
Magic Placeholder Names13 hits · 65 pts
SeverityFileLineSnippetContext
HIGHdocs/zh-hant/docs/advanced/opentelemetry.md57如果你的服務需要驗證身分,請將 `OTEL_EXPORTER_OTLP_HEADERS` 設定為該服務指定的標頭,例如 `api-key=YOUR_API_KEY`。CODE
HIGHdocs/ja/docs/advanced/opentelemetry.md57サービスで認証が必要な場合は、`OTEL_EXPORTER_OTLP_HEADERS`にサービスが指定するヘッダー(例: `api-key=YOUR_API_KEY`)を設定してください。CODE
HIGHdocs/ru/docs/advanced/opentelemetry.md57Если ваш сервис требует аутентификации, задайте `OTEL_EXPORTER_OTLP_HEADERS` со значением HTTP-заголовков, которые он укCODE
HIGHdocs/pt/docs/advanced/opentelemetry.md57Se o serviço exigir autenticação, defina `OTEL_EXPORTER_OTLP_HEADERS` com os cabeçalhos especificados por ele, por exempCODE
HIGHdocs/zh/docs/advanced/opentelemetry.md57如果你的服务需要身份验证,请将 `OTEL_EXPORTER_OTLP_HEADERS` 设置为该服务指定的请求头,例如 `api-key=YOUR_API_KEY`。CODE
HIGHdocs/uk/docs/advanced/opentelemetry.md57Якщо ваш сервіс вимагає автентифікації, задайте в `OTEL_EXPORTER_OTLP_HEADERS` заголовки, які він визначає, наприклад `aCODE
HIGHdocs/hi/docs/advanced/opentelemetry.md57यदि आपकी सेवा को प्रमाणीकरण की ज़रूरत है, तो `OTEL_EXPORTER_OTLP_HEADERS` में उसके बताए गए headers सेट करें, उदाहरण के लCODE
HIGHdocs/de/docs/advanced/opentelemetry.md57Wenn Ihr Dienst Authentifizierung erfordert, setzen Sie `OTEL_EXPORTER_OTLP_HEADERS` auf die von ihm vorgegebenen HeaderCODE
HIGHdocs/ko/docs/advanced/opentelemetry.md57서비스에서 인증을 요구하는 경우, `OTEL_EXPORTER_OTLP_HEADERS`를 해당 서비스에서 지정한 헤더로 설정하세요. 예를 들면 `api-key=YOUR_API_KEY`입니다.CODE
HIGHdocs/fr/docs/advanced/opentelemetry.md57Si votre service nécessite une authentification, définissez `OTEL_EXPORTER_OTLP_HEADERS` avec les en-têtes qu'il spécifiCODE
HIGHdocs/es/docs/advanced/opentelemetry.md57Si tu servicio requiere autenticación, establece `OTEL_EXPORTER_OTLP_HEADERS` con los headers que especifique, por ejempCODE
HIGHdocs/en/docs/advanced/opentelemetry.md58If your service requires authentication, set `OTEL_EXPORTER_OTLP_HEADERS` to the headers it specifies, for example `api-CODE
HIGHdocs/tr/docs/advanced/opentelemetry.md57Hizmetiniz kimlik doğrulaması gerektiriyorsa `OTEL_EXPORTER_OTLP_HEADERS` değerini, hizmetin belirttiği header'lara göreCODE
Empty Error Handlers8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHtests/test_validation_error_context.py91except Exception:CODE
HIGHtests/test_validation_error_context.py104except Exception:CODE
HIGHtests/test_validation_error_context.py118except Exception:CODE
HIGHtests/test_validation_error_context.py131except Exception:CODE
HIGHtests/test_validation_error_context.py145except Exception:CODE
HIGHfastapi/routing.py1858except routing.NoMatchFound:CODE
HIGHfastapi/routing.py2072except ValueError:CODE
HIGHfastapi/routing.py622except anyio.EndOfStream:CODE
AI Structural Patterns48 hits · 40 pts
SeverityFileLineSnippetContext
LOWtests/test_dependency_after_yield_streaming.py53CODE
LOWfastapi/params.py29CODE
LOWfastapi/params.py140CODE
LOWfastapi/params.py224CODE
LOWfastapi/params.py306CODE
LOWfastapi/params.py390CODE
LOWfastapi/params.py470CODE
LOWfastapi/params.py582CODE
LOWfastapi/params.py664CODE
LOWfastapi/applications.py64CODE
LOWfastapi/applications.py1229CODE
LOWfastapi/applications.py1365CODE
LOWfastapi/applications.py1505CODE
LOWfastapi/applications.py1710CODE
LOWfastapi/applications.py2083CODE
LOWfastapi/applications.py2461CODE
LOWfastapi/applications.py2839CODE
LOWfastapi/applications.py3212CODE
LOWfastapi/applications.py3585CODE
LOWfastapi/applications.py3958CODE
LOWfastapi/applications.py4336CODE
LOWfastapi/encoders.py129CODE
LOWfastapi/routing.py308CODE
LOWfastapi/routing.py385CODE
LOWfastapi/routing.py994CODE
LOWfastapi/routing.py1194CODE
LOWfastapi/routing.py1335CODE
LOWfastapi/routing.py2329CODE
LOWfastapi/routing.py2969CODE
LOWfastapi/routing.py3053CODE
LOWfastapi/routing.py3213CODE
LOWfastapi/routing.py3402CODE
LOWfastapi/routing.py3779CODE
LOWfastapi/routing.py4161CODE
LOWfastapi/routing.py4543CODE
LOWfastapi/routing.py4920CODE
LOWfastapi/routing.py5297CODE
LOWfastapi/routing.py5679CODE
LOWfastapi/routing.py6061CODE
LOWfastapi/param_functions.py13CODE
LOWfastapi/param_functions.py357CODE
LOWfastapi/param_functions.py701CODE
LOWfastapi/param_functions.py1018CODE
LOWfastapi/param_functions.py1323CODE
LOWfastapi/param_functions.py1653CODE
LOWfastapi/param_functions.py1968CODE
LOWfastapi/openapi/utils.py585CODE
LOW…_operation_advanced_configuration/tutorial006_py310.py41CODE
Deep Nesting38 hits · 32 pts
SeverityFileLineSnippetContext
LOWtests/test_telemetry/test_runtime.py29CODE
LOWtests/test_telemetry/test_runtime.py582CODE
LOWtests/test_telemetry/test_tracer.py17CODE
LOWtests/test_telemetry/test_data.py320CODE
LOWtests/test_telemetry/test_environment_integrations.py22CODE
LOWfastapi/encoders.py129CODE
LOWfastapi/routing.py385CODE
LOWfastapi/routing.py994CODE
LOWfastapi/routing.py416CODE
LOWfastapi/routing.py1765CODE
LOWfastapi/routing.py2191CODE
LOWfastapi/routing.py2766CODE
LOWfastapi/routing.py2891CODE
LOWfastapi/routing.py3213CODE
LOWfastapi/routing.py545CODE
LOWfastapi/routing.py580CODE
LOWfastapi/routing.py610CODE
LOWfastapi/dependencies/utils.py271CODE
LOWfastapi/dependencies/utils.py350CODE
LOWfastapi/dependencies/utils.py381CODE
LOWfastapi/dependencies/utils.py586CODE
LOWfastapi/dependencies/utils.py780CODE
LOWfastapi/dependencies/utils.py912CODE
LOWfastapi/openapi/utils.py159CODE
LOWfastapi/openapi/utils.py311CODE
LOWfastapi/openapi/utils.py585CODE
LOWfastapi/telemetry/_runtime.py85CODE
LOWfastapi/telemetry/_asgi.py228CODE
LOWfastapi/_compat/shared.py113CODE
LOWfastapi/_compat/v2.py446CODE
LOWscripts/notify_translations.py306CODE
LOWscripts/doc_parsing_utils.py141CODE
LOWscripts/doc_parsing_utils.py482CODE
LOWscripts/doc_parsing_utils.py570CODE
LOWscripts/docs.py208CODE
LOWscripts/docs.py600CODE
LOWscripts/docs.py727CODE
LOWscripts/docs.py837CODE
Excessive Try-Catch Wrapping20 hits · 24 pts
SeverityFileLineSnippetContext
LOWtests/test_ws_router.py220 except Exception as e: # pragma: no coverCODE
LOWtests/test_ws_router.py245 except Exception as e:CODE
MEDIUMtests/test_ws_router.py217def catcher(websocket, call_next):CODE
LOW⚡tests/test_validation_error_context.py91 except Exception:CODE
LOW⚡tests/test_validation_error_context.py104 except Exception:CODE
LOW⚡tests/test_validation_error_context.py118 except Exception:CODE
LOW⚡tests/test_validation_error_context.py131 except Exception:CODE
LOW⚡tests/test_validation_error_context.py145 except Exception:CODE
LOWfastapi/concurrency.py30 except Exception as e:CODE
LOWfastapi/encoders.py348 except Exception as e:CODE
LOWfastapi/encoders.py353 except Exception as e:CODE
LOWfastapi/routing.py301 except Exception:CODE
LOWfastapi/routing.py483 except Exception as e:CODE
LOWfastapi/telemetry/_api.py222 except Exception as exc:CODE
LOWfastapi/telemetry/_runtime.py24 except Exception:CODE
LOWfastapi/telemetry/_runtime.py35 except Exception:CODE
LOWfastapi/telemetry/_runtime.py203 except Exception:CODE
LOWfastapi/telemetry/_runtime.py218 except Exception as exc:CODE
LOWfastapi/telemetry/_asgi.py152 except Exception as exc:CODE
MEDIUMscripts/translation_fixer.py97 print(f"Error processing {path}: {e}")CODE
Cross-Language Confusion4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHscripts/translate.py453 repo.git.push("origin", branch_name)CODE
HIGHscripts/translate.py485 repo.git.push("origin", f"HEAD:{github_ref_name}")CODE
HIGHdocs_src/websockets_/tutorial002_an_py310.py35 var ws = null;CODE
HIGHdocs_src/websockets_/tutorial002_py310.py33 var ws = null;CODE
Structural Annotation Overuse8 hits · 12 pts
SeverityFileLineSnippetContext
LOWdocs/ja/docs/tutorial/first-steps.md390### Step 5: コンテンツの返信 { #step-5-return-the-content }COMMENT
LOWdocs/ja/docs/tutorial/first-steps.md400### Step 6: デプロイする { #step-6-deploy-it }COMMENT
LOWdocs/en/docs/tutorial/first-steps.md231### Step 1: import `FastAPI` { #step-1-import-fastapi }COMMENT
LOWdocs/en/docs/tutorial/first-steps.md245### Step 2: create a `FastAPI` "instance" { #step-2-create-a-fastapi-instance }COMMENT
LOWdocs/en/docs/tutorial/first-steps.md253### Step 3: create a *path operation* { #step-3-create-a-path-operation }COMMENT
LOWdocs/en/docs/tutorial/first-steps.md362### Step 4: define the **path operation function** { #step-4-define-the-path-operation-function }COMMENT
LOWdocs/en/docs/tutorial/first-steps.md390### Step 5: return the content { #step-5-return-the-content }COMMENT
LOWdocs/en/docs/tutorial/first-steps.md400### Step 6: Deploy it { #step-6-deploy-it }COMMENT
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUM…s/test_tutorial/test_sql_databases/test_tutorial002.py63 # Create a heroCOMMENT
MEDIUM…s/test_tutorial/test_sql_databases/test_tutorial001.py63 # Create a heroCOMMENT
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMdocs/en/data/sponsors.yml55 # title: Learn to build high-quality web apps with best practicesCOMMENT
MEDIUMfastapi/routing.py355 # facilitate profiling endpoints, since inner functions are harder to profile.COMMENT
Over-Commented Block5 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/test_schema_extra_examples.py61 # def form_examples(COMMENT
LOWtests/test_request_params/test_cookie/test_list.py1# Currently, there is no way to pass multiple cookies with the same name.COMMENT
LOW…/test_request_params/test_cookie/test_optional_list.py1# Currently, there is no way to pass multiple cookies with the same name.COMMENT
LOWfastapi/applications.py1081 # those now have their own AsyncExitStack, to properly supportCOMMENT
LOWfastapi/routing.py581 ObjectReceiveStream[bytes]COMMENT
Modern Structural Boilerplate4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/test_stream_status_code.py52def set_accepted(response: Response) -> None:CODE
LOW⚡fastapi/routing.py915def _update_scope(scope: Scope, child_scope: Scope) -> None:CODE
LOWscripts/docs.py421def update_languages() -> None:STRING
LOWscripts/docs.py703def update_docs_includes_py39_to_py310() -> None:STRING
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMfastapi/.agents/skills/fastapi/SKILL.md16* Dependencies: use `Annotated[..., Depends(...)]`; see [Dependency Injection](#dependency-injection) and [the dependencCOMMENT
Redundant / Tautological Comments2 hits · 2 pts
SeverityFileLineSnippetContext
LOWfastapi/dependencies/utils.py875 # Check if it's a Union type (covers both typing.Union and types.UnionType in Python 3.10+)COMMENT
LOWscripts/docs.py767 # Check if the _an counterpart (or non-_an counterpart) is referenced.STRING