Repository Analysis

sanic-org/sanic

Accelerate your web app development | Build fast. Run fast.

13.3 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of sanic-org/sanic, a Python project with 18,631 GitHub stars. SynthScan v2.0 examined 101,089 lines of code across 494 source files, recording 1229 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 13.3 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).

13.3
Adjusted Score
13.3
Raw Score
100%
Time Factor
2026-07-12
Last Push
18.6K
Stars
Python
Language
101.1K
Lines of Code
494
Files
1.2K
Pattern Hits
2026-07-14
Scan Date
0.07
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

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

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 0HIGH 37MEDIUM 19LOW 1173

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 1229 distinct pattern matches across 15 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 Identifiers831 hits · 786 pts
SeverityFileLineSnippetContext
LOWguide/webapp/display/page/docobject.py299def _define_heading_and_class(CODE
LOWguide/webapp/display/plugins/notification.py45 def _render_admonition_content(self, _, text) -> str:CODE
LOWguide/webapp/display/search/search.py86def _inverse_document_frequency(docs: list[Document]) -> dict[str, float]:CODE
LOWguide/webapp/worker/livereload.js2173 getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {CODE
LOWguide/webapp/worker/livereload.js3495 value: function collectImportedStylesheets(link, styleSheet, result) {CODE
LOWguide/content/en/guide/basics/middleware.md145 def convert_slug_to_underscore(request: Request):CODE
LOWguide/content/en/guide/basics/tasks.md11async def notify_server_started_after_five_seconds():CODE
LOWguide/content/en/guide/how-to/cors.md73def _compile_routes_needing_options(CODE
LOWguide/content/en/plugins/sanic-testing/clients.md120 def test_multiple_endpoints_on_same_server(app):CODE
LOWtests/test_redirect.py35 async def redirect_with_header_injection(request):CODE
LOWtests/test_redirect.py54def test_redirect_headers_none(redirect_app):CODE
LOWtests/test_redirect.py75def test_get_then_redirect_follow_redirect(redirect_app):CODE
LOWtests/test_redirect.py99def test_redirect_with_header_injection(redirect_app):CODE
LOWtests/test_redirect.py120def test_redirect_with_params(app, test_str):CODE
LOWtests/test_handler.py6def test_handler_operation_order(app: Sanic):CODE
LOWtests/test_json_encoding.py60def test_change_encoder_to_some_custom():CODE
LOWtests/test_test_client_port.py11def test_test_client_port_none(app):CODE
LOWtests/test_test_client_port.py25def test_test_client_port_default(app):CODE
LOWtests/test_utils.py19def test_load_module_from_file_location(location):CODE
LOWtests/test_utils.py25def test_loaded_module_from_file_location_name():CODE
LOWtests/test_utils.py36def test_load_module_from_file_location_with_non_existing_env_variable():CODE
LOWtests/test_utils.py44def test_load_module_from_file_location_using_env():CODE
LOWtests/conftest.py82 def generate_random_direct_route(self, max_route_depth=4):CODE
LOWtests/conftest.py115 def generate_url_for_template(template):CODE
LOWtests/test_bad_request.py6def test_bad_request_response(app: Sanic):CODE
LOWtests/test_response.py251def test_chunked_streaming_adds_correct_headers(streaming_app):CODE
LOWtests/test_response.py260def test_chunked_streaming_returns_correct_content(streaming_app):CODE
LOWtests/test_response.py266async def test_chunked_streaming_returns_correct_content_asgi(streaming_app):CODE
LOWtests/test_response.py271def test_non_chunked_streaming_adds_correct_headers(non_chunked_streaming_app):CODE
LOWtests/test_response.py280async def test_non_chunked_streaming_adds_correct_headers_asgi(CODE
LOWtests/test_response.py289def test_non_chunked_streaming_returns_correct_content(CODE
LOWtests/test_response.py296def test_stream_response_with_cookies(app):CODE
LOWtests/test_response.py41def test_response_body_not_a_string(app):CODE
LOWtests/test_response.py117def test_response_content_length(app):CODE
LOWtests/test_response.py150def test_response_content_length_with_different_data_types(app):CODE
LOWtests/test_response.py152 async def get_data_with_different_types(request: Request):CODE
LOWtests/test_response.py174 async def no_content_unmodified_handler(request: Request):CODE
LOWtests/test_response.py239def non_chunked_streaming_app(app):CODE
LOWtests/test_response.py315def test_stream_response_without_cookies(app):CODE
LOWtests/test_response.py346def get_file_last_modified_timestamp(CODE
LOWtests/test_response.py383def test_file_response_custom_filename(CODE
LOWtests/test_response.py435def test_file_stream_response(app: Sanic, file_name, static_file_directory):CODE
LOWtests/test_response.py460def test_file_stream_response_custom_filename(CODE
LOWtests/test_response.py479def test_file_stream_head_response(CODE
LOWtests/test_response.py524def test_file_stream_response_range(CODE
LOWtests/test_response.py571def test_direct_response_stream(app: Sanic):CODE
LOWtests/test_response.py587async def test_direct_response_stream_asgi(app: Sanic):CODE
LOWtests/test_response.py701def test_send_response_after_eof_should_fail(CODE
LOWtests/test_response.py733async def test_send_response_after_eof_should_fail_asgi(CODE
LOWtests/test_response.py768def test_file_response_headers(CODE
LOWtests/test_response.py787 def file_route_cache_default_last_modified(CODE
LOWtests/test_response.py906def test_file_validating_invalid_header(CODE
LOWtests/test_response.py993def test_stream_response_with_default_headers(app: Sanic):CODE
LOWtests/test_blueprint_copy.py83def test_bp_copy_without_route_overwriting(app: Sanic):CODE
LOWtests/test_blueprint_copy.py117def test_bp_copy_with_route_overwriting(app: Sanic):CODE
LOWtests/test_logging.py84def test_logging_pass_customer_logconfig():CODE
LOWtests/test_logging.py129def test_logging_modified_root_logger_config():CODE
LOWtests/test_logging.py140def test_access_log_client_ip_remote_addr(monkeypatch):CODE
LOWtests/test_logging.py169def test_access_log_client_ip_reqip(monkeypatch):CODE
LOWtests/test_logging.py289def test_log_extra_config_respected():CODE
771 more matches not shown…
Docstring Block Structure36 hits · 180 pts
SeverityFileLineSnippetContext
HIGHsanic/signals.py161Get the handlers for a signal Args: event (str): The event to get the handlers for condSTRING
HIGHsanic/signals.py275Dispatch a signal to all handlers that match the event Args: event (str): The event to dispatch STRING
HIGHsanic/signals.py373Finalize the router and compile the routes Args: do_compile (bool, optional): Whether to compile thSTRING
HIGHsanic/config.py113Convert an environment variable to a Python value. Args: full_key: The full environment variable naSTRING
HIGHsanic/config.py225Update the config with new values. This method will update the config with the values from the provided STRING
HIGHsanic/blueprints.py811Set the Blueprint object at the specified index. Abstract method implemented to turn the `BlueprintGroup` classSTRING
HIGHsanic/blueprints.py846Delete the Blueprint object at the specified index. Abstract method implemented to turn the `BlueprintGroup` clSTRING
HIGHsanic/blueprints.py888Decorate a function to handle exceptions for all blueprints in the group. In case of nested Blueprint Groups, tSTRING
HIGHsanic/app.py678Dispatches an event to the signal router. Args: event (str): Name of the event to dispatch. STRING
HIGHsanic/app.py729Wait for a specific event to be triggered. This method waits for a named event to be triggered and can be used STRING
HIGHsanic/app.py943Build a URL based on a view name and the values provided. This method constructs URLs for a given view name, taSTRING
HIGHsanic/app.py2055Extend Sanic with additional functionality using Sanic Extensions. This method enables you to add one or more SSTRING
HIGHsanic/app.py2114Register a Sanic instance with the class registry. This method adds a Sanic application instance to the class rSTRING
HIGHsanic/app.py2144Unregister a Sanic instance from the class registry. This method removes a previously registered Sanic applicatSTRING
HIGHsanic/app.py2173Retrieve an instantiated Sanic instance by name. This method is best used when needing to get access to an alreSTRING
HIGHsanic/headers.py299Parse an Accept header and order the acceptable media types according to RFC 7231, s. 5.3.2 https://datatracker.ietSTRING
HIGHsanic/router.py55Retrieve a `Route` object containing the details about how to handle a response for a given request :param requSTRING
HIGHsanic/views.py161Return view function for use with the routing system, that dispatches request to appropriate handler method. IfSTRING
HIGHsanic/response/convenience.py73Returns response object with body in text format. Args: body (str): Response data. status (int, optSTRING
HIGHsanic/response/types.py449Pops a key from the response's raw_body, ensuring that body is kept up to date. This can only be used if raw_boSTRING
HIGHsanic/mixins/startup.py179Run the HTTP Server and listen until keyboard interrupt or term signal. On termination, drain connections before closingSTRING
HIGHsanic/mixins/startup.py310Prepares one or more Sanic applications to be served simultaneously. This low-level API is typically used when STRING
HIGHsanic/mixins/startup.py480 Low level API for creating a Sanic Server instance. This method will create a Sanic Server instance, bSTRING
HIGHsanic/mixins/startup.py958Serve one or more Sanic applications. This is the main entry point for running Sanic applications. It sSTRING
HIGHsanic/mixins/static.py52Register a root to serve files from. The input can either be a file or a directory. This method provides an easSTRING
HIGHsanic/mixins/middleware.py111Register a middleware to be called before a request is handled. This is the same as *@app.middleware('request')STRING
HIGHsanic/mixins/middleware.py138Register a middleware to be called after a response is created. This is the same as *@app.middleware('response'STRING
HIGHsanic/mixins/routes.py57Decorate a function to be registered as a route. Args: uri (str): Path of the URL. methSTRING
HIGHsanic/mixins/routes.py228A helper method to register class-based view or functions as a handler to the application url routes. Args: STRING
HIGHsanic/server/runners.py62Start asynchronous HTTP Server on an individual process. :param host: Address to host on :param port: Port to hSTRING
HIGHsanic/request/types.py560Load the request body as JSON Args: loads (Callable, optional): A custom JSON loader. Defaults to NSTRING
HIGHsanic/request/types.py705Parse `query_string` using `urllib.parse.parse_qs`. This methods is used by the `args` property, but it also STRING
HIGHsanic/handlers/error.py148Provide a default behavior for the objects of ErrorHandler. If a developer chooses to extend the ErrorHandler, STRING
HIGHsanic/handlers/directory.py75Handle the request. Args: request (Request): The incoming request object. path (str): TSTRING
HIGHsanic/cookies/response.py159Add a cookie to the CookieJar. Args: key (str): Key of the cookie. value (str): Value oSTRING
HIGHsanic/cookies/response.py575Create a cookie key with the appropriate prefix. Cookies can have one ow two prefixes. The first is `__Host-` wSTRING
Unused Imports156 hits · 152 pts
SeverityFileLineSnippetContext
LOWguide/webapp/display/base.py1CODE
LOWguide/webapp/display/page/renderer.py1CODE
LOWguide/webapp/display/page/__init__.py1CODE
LOWguide/webapp/display/page/__init__.py2CODE
LOWguide/webapp/display/page/page.py1CODE
LOWguide/webapp/display/page/docobject.py1CODE
LOWguide/webapp/display/search/search.py1CODE
LOWguide/webapp/display/layouts/home.py1CODE
LOWguide/webapp/display/layouts/models.py1CODE
LOWguide/webapp/display/layouts/base.py1CODE
LOWtests/test_ext_integration.py9CODE
LOWsanic/signals.py1CODE
LOWsanic/config.py1CODE
LOWsanic/compat.py28CODE
LOWsanic/compat.py151CODE
LOWsanic/log.py1CODE
LOWsanic/log.py2CODE
LOWsanic/log.py3CODE
LOWsanic/log.py4CODE
LOWsanic/log.py5CODE
LOWsanic/log.py5CODE
LOWsanic/log.py5CODE
LOWsanic/log.py5CODE
LOWsanic/log.py5CODE
LOWsanic/blueprint_group.py1CODE
LOWsanic/asgi.py1CODE
LOWsanic/__init__.py5CODE
LOWsanic/__init__.py6CODE
LOWsanic/__init__.py7CODE
LOWsanic/__init__.py8CODE
LOWsanic/__init__.py9CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py10CODE
LOWsanic/__init__.py27CODE
LOWsanic/__init__.py27CODE
LOWsanic/__init__.py27CODE
LOWsanic/__init__.py27CODE
LOWsanic/__init__.py27CODE
LOWsanic/__init__.py27CODE
LOWsanic/__init__.py27CODE
LOWsanic/__init__.py27CODE
LOWsanic/__init__.py37CODE
LOWsanic/blueprints.py1CODE
LOWsanic/app.py1CODE
LOWsanic/headers.py1CODE
LOWsanic/router.py1CODE
LOWsanic/middleware.py1CODE
LOWsanic/views.py1CODE
96 more matches not shown…
Excessive Try-Catch Wrapping52 hits · 56 pts
SeverityFileLineSnippetContext
LOWtests/test_logging.py261 except Exception as e:CODE
LOWtests/test_errorpages.py97 except Exception as e:CODE
LOWtests/test_errorpages.py351 except Exception as e:CODE
LOWtests/test_exceptions_handler.py55 except Exception as e:CODE
LOWtests/test_exceptions_handler.py177 except Exception:CODE
MEDIUMtests/test_exceptions_handler.py52def handler_6(request, arg):CODE
LOWtests/test_request.py257 except Exception as e:CODE
MEDIUMtests/test_request.py254def get(request):CODE
LOWtests/test_routes.py172 except Exception:CODE
LOWtests/test_app.py217 except Exception:CODE
LOWscripts/release.py84 except Exception:STRING
LOWsanic/signals.py253 except Exception as e:CODE
LOWsanic/asgi.py87 except Exception as e:CODE
LOWsanic/asgi.py97 except Exception as e:CODE
LOWsanic/asgi.py259 except Exception as e:CODE
LOWsanic/asgi.py262 except Exception as exc:CODE
LOWsanic/utils.py132 except Exception as e:CODE
MEDIUMsanic/app.py1643def do(task):CODE
LOWsanic/app.py1212 except Exception as e:CODE
LOWsanic/app.py1220 except Exception as e:CODE
LOWsanic/app.py1429 except Exception as e:CODE
LOWsanic/app.py1468 except Exception as e:CODE
LOWsanic/app.py1657 except Exception as e:CODE
LOWsanic/__main__.py5except Exception as exc:CODE
LOWsanic/__main__.py24 except Exception as e:CODE
MEDIUMsanic/__main__.py19def main(args=None):CODE
LOWsanic/mixins/static.py356 except Exception:CODE
LOWsanic/server/websockets/impl.py258 except Exception as e:CODE
LOWsanic/server/websockets/impl.py325 except Exception:CODE
LOWsanic/server/websockets/impl.py364 except Exception:CODE
LOWsanic/server/protocols/base_protocol.py152 except Exception:CODE
LOWsanic/server/protocols/http_protocol.py165 except Exception:CODE
LOWsanic/server/protocols/http_protocol.py251 except Exception:CODE
LOWsanic/server/protocols/http_protocol.py305 except Exception:CODE
LOWsanic/server/protocols/http_protocol.py323 except Exception:CODE
LOWsanic/server/protocols/websocket_protocol.py135 except Exception:CODE
LOWsanic/http/http3.py126 except Exception as e: # no covCODE
LOWsanic/http/http3.py311 except Exception as e:CODE
LOWsanic/http/http1.py147 except Exception as e:CODE
LOWsanic/http/http1.py235 except Exception:CODE
LOWsanic/http/http1.py289 except Exception:CODE
LOWsanic/http/http1.py442 except Exception as e:CODE
LOWsanic/http/http1.py531 except Exception:CODE
LOWsanic/http/tls/creators.py195 except Exception as e:CODE
MEDIUMsanic/http/tls/creators.py187def check_supported(self) -> None:CODE
LOWsanic/request/types.py409 except Exception:CODE
LOWsanic/request/types.py576 except Exception:CODE
LOWsanic/request/types.py669 except Exception:CODE
LOWsanic/worker/serve.py140 except Exception as e:CODE
LOWsanic/worker/manager.py544 except Exception:CODE
LOWsanic/pages/error.py108 except Exception:CODE
LOWsanic/handlers/error.py131 except Exception:CODE
Deep Nesting56 hits · 50 pts
SeverityFileLineSnippetContext
LOWguide/webapp/display/page/page.py69CODE
LOWguide/webapp/display/plugins/hook.py13CODE
LOWguide/webapp/display/layouts/main.py14CODE
LOWtests/test_daemon.py653CODE
LOWtests/test_daemon.py681CODE
LOWtests/test_daemon.py784CODE
LOWtests/test_daemon.py808CODE
LOWtests/test_daemon.py835CODE
LOWtests/test_daemon.py857CODE
LOWtests/test_daemon.py918CODE
LOWtests/test_config.py321CODE
LOWtests/typing/test_typing.py96CODE
LOWsanic/signals.py205CODE
LOWsanic/config.py325CODE
LOWsanic/asgi.py81CODE
LOWsanic/utils.py54CODE
LOWsanic/app.py849CODE
LOWsanic/app.py942CODE
LOWsanic/app.py1136CODE
LOWsanic/app.py1277CODE
LOWsanic/app.py2461CODE
LOWsanic/headers.py444CODE
LOWsanic/errorpages.py342CODE
LOWsanic/mixins/startup.py606CODE
LOWsanic/mixins/startup.py951CODE
LOWsanic/mixins/startup.py1318CODE
LOWsanic/mixins/static.py185CODE
LOWsanic/mixins/static.py264CODE
LOWsanic/mixins/routes.py213CODE
LOWsanic/server/socket.py81CODE
LOWsanic/server/websockets/impl.py181CODE
LOWsanic/server/websockets/impl.py216CODE
LOWsanic/server/websockets/impl.py285CODE
LOWsanic/server/websockets/impl.py379CODE
LOWsanic/server/websockets/impl.py568CODE
LOWsanic/server/websockets/impl.py675CODE
LOWsanic/server/protocols/http_protocol.py208CODE
LOWsanic/cli/console.py279CODE
LOWsanic/cli/app.py182CODE
LOWsanic/cli/app.py275CODE
LOWsanic/http/http1.py178CODE
LOWsanic/http/http1.py297CODE
LOWsanic/request/types.py499CODE
LOWsanic/request/form.py32CODE
LOWsanic/worker/reloader.py34CODE
LOWsanic/worker/reloader.py85CODE
LOWsanic/worker/serve.py26CODE
LOWsanic/worker/loader.py69CODE
LOWsanic/worker/manager.py285CODE
LOWsanic/worker/manager.py375CODE
LOWsanic/worker/manager.py466CODE
LOWsanic/pages/error.py56CODE
LOWsanic/pages/error.py98CODE
LOWsanic/pages/base.py47CODE
LOWsanic/logging/formatter.py137CODE
LOWsanic/cookies/response.py452CODE
Over-Commented Block37 hits · 37 pts
SeverityFileLineSnippetContext
LOWtests/test_unix_socket.py201 app_multi.run(host="myhost.invalid", unix=SOCKPATH, workers=2)COMMENT
LOWtests/test_unix_socket.py221# assert r.status_code == 200, r.textCOMMENT
LOWtests/test_unix_socket.py241# while not os.path.exists(SOCKPATH):COMMENT
LOWtests/test_unix_socket.py261# processes[-1].send_signal(SIGINT)COMMENT
LOWtests/test_reloader.py1# 2024-12-22 AMH - Reloader tests have not been working for a while.COMMENT
LOWtests/test_reloader.py21COMMENT
LOWtests/test_reloader.py41# text = secrets.token_urlsafe()COMMENT
LOWtests/test_reloader.py61# )COMMENT
LOWtests/test_reloader.py81# print("reload_start", os.getpid(), {start_text!r})COMMENT
LOWtests/test_reloader.py101# from sanic import SanicCOMMENT
LOWtests/test_reloader.py121COMMENT
LOWtests/test_reloader.py141# "-m",COMMENT
LOWtests/test_reloader.py161# with TemporaryDirectory() as tmpdir:COMMENT
LOWtests/test_reloader.py181# proc.wait(timeout=3)COMMENT
LOWtests/test_reloader.py201# if mode == "sanic":COMMENT
LOWtests/test_reloader.py221COMMENT
LOWtests/test_reloader.py241# assert stop_text in next(line)COMMENT
LOWtests/test_tls.py661# ):COMMENT
LOWtests/test_multi_serve.py1# import loggingCOMMENT
LOWtests/test_multi_serve.py21# def app_one():COMMENT
LOWtests/test_multi_serve.py41COMMENT
LOWtests/test_multi_serve.py61# "Goin' Fast @ http://127.0.0.1:23457",COMMENT
LOWtests/test_multi_serve.py81COMMENT
LOWtests/test_multi_serve.py101# after_stop.assert_awaited_once()COMMENT
LOWtests/test_multi_serve.py121# app_one.signal(event)(AsyncMock())COMMENT
LOWtests/test_multi_serve.py141# app_two.main_process_stop(AsyncMock())COMMENT
LOWtests/test_multi_serve.py161# message = "Did not find any applications."COMMENT
LOWtests/test_multi_serve.py181COMMENT
LOWtests/test_multi_serve.py201# app_two.prepare(port=23457)COMMENT
LOWtests/performance/sanic/varied_server.py61app.run(host="0.0.0.0", port=sys.argv[1])COMMENT
LOWtests/performance/sanic/varied_server.py81COMMENT
LOWtests/performance/sanic/varied_server.py101# host='127.0.0.1', port=6379COMMENT
LOWdocs/conf.py1#!/usr/bin/env python3COMMENT
LOWdocs/conf.py41# General information about the project.COMMENT
LOWdocs/conf.py61language = "en"COMMENT
LOWdocs/conf.py81html_theme = "sphinx_rtd_theme"COMMENT
LOWsanic/server/protocols/base_protocol.py101 # Check write-buffer data left _after_ close is called.COMMENT
AI Structural Patterns24 hits · 22 pts
SeverityFileLineSnippetContext
LOWtests/test_cookies.py105CODE
LOWtests/typing/test_typing.py26CODE
LOWsanic/app.py228CODE
LOWsanic/app.py249CODE
LOWsanic/app.py270CODE
LOWsanic/app.py291CODE
LOWsanic/app.py311CODE
LOWsanic/app.py1130CODE
LOWsanic/router.py78CODE
LOWsanic/views.py117CODE
LOWsanic/response/convenience.py206CODE
LOWsanic/response/types.py124CODE
LOWsanic/mixins/startup.py152CODE
LOWsanic/mixins/startup.py282CODE
LOWsanic/mixins/startup.py464CODE
LOWsanic/mixins/startup.py630CODE
LOWsanic/mixins/static.py32CODE
LOWsanic/mixins/routes.py38CODE
LOWsanic/mixins/routes.py213CODE
LOWsanic/mixins/routes.py671CODE
LOWsanic/server/runners.py42CODE
LOWsanic/worker/serve.py26CODE
LOWsanic/cookies/response.py142CODE
LOWsanic/cookies/response.py386CODE
Dead Code9 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_errorpages.py170CODE
MEDIUMtests/test_errorpages.py175CODE
MEDIUMtests/test_errorpages.py180CODE
MEDIUMtests/test_errorpages.py196CODE
MEDIUMtests/test_errorpages.py201CODE
MEDIUMtests/test_errorpages.py216CODE
MEDIUMtests/test_errorpages.py221CODE
MEDIUMtests/test_errorpages.py279CODE
MEDIUMtests/test_ws_handlers.py61CODE
Modern Structural Boilerplate11 hits · 11 pts
SeverityFileLineSnippetContext
LOWguide/webapp/display/page/__init__.py5__all__ = ["Page", "PageRenderer"]CODE
LOWsanic/blueprint_group.py4__all__ = ["BlueprintGroup"] # noqa: F405CODE
LOWsanic/app.py1955 def update_config(self, config: bytes | str | dict | Any) -> None:CODE
LOWsanic/app.py2414 def set_serving(self, serving: bool) -> None:CODE
LOWsanic/mixins/startup.py917 def _set_startup_method(cls) -> None:CODE
LOWsanic/application/state.py80 def set_verbosity(self, value: int) -> None:CODE
LOWsanic/worker/multiplexer.py86 def set_serving(self, serving: bool) -> None:CODE
LOWsanic/worker/daemon.py495 def _setup_signal_handlers(self) -> None:CODE
LOWsanic/logging/formatter.py74 def _set_levelname(self, record: logging.LogRecord) -> None:CODE
LOWsanic/logging/formatter.py132 def _set_levelname(self, record: logging.LogRecord) -> None:CODE
LOWsanic/logging/formatter.py231 def _set_levelname(self, record: logging.LogRecord) -> None:CODE
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWexamples/override_logging.py13# Set logger to override default basicConfigCOMMENT
LOWsanic/headers.py399 # Check if we would return on next round, to avoid useless parseCOMMENT
LOWsanic/mixins/static.py295 # Check if the client has been sent this file beforeCOMMENT
LOWsanic/mixins/static.py405 # Check if it's a symlink and determine its typeCOMMENT
LOWsanic/server/protocols/base_protocol.py93 # Check if write is already paused _before_ close() is called.COMMENT
Self-Referential Comments3 hits · 7 pts
SeverityFileLineSnippetContext
MEDIUMdocs/conf.py7# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMsanic/blueprints.py612 """This class provides a mechanism to implement a Blueprint Group.STRING
MEDIUMsanic/server/socket.py101 # Create a listening socket or use the one in settingsCOMMENT
AI Response Leakage1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHguide/content/en/plugins/sanic-ext/injection.md237 This works very similar to the [last example](#objects-from-the-request) where the goal is the extract something froCODE
Modern AI Meta-Vocabulary2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMguide/content/en/plugins/sanic-ext/injection.md237 This works very similar to the [last example](#objects-from-the-request) where the goal is the extract something froCODE
MEDIUMguide/content/en/plugins/sanic-ext/injection.md298Be carefule when using a [generic type](https://docs.python.org/3/library/typing.html#typing.Generic). The way that SaniCODE
Overly Generic Function Names4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/test_blueprint_copy.py15 def handle_request(request):CODE
LOWexamples/redirect_example.py8def handle_request(request):CODE
LOWexamples/modify_header_example.py12def handle_request(request):CODE
LOWsanic/app.py1277 async def handle_request(self, request: Request) -> None: # no covCODE
AI Slop Vocabulary2 hits · 3 pts
SeverityFileLineSnippetContext
LOWguide/webapp/worker/livereload.js325 // #match works fine because it just return the exec results, even if it hasCOMMENT
LOWexamples/exception_monitoring.py33 # For this we can just call the super class' default handlerCOMMENT