AI Slop Code RIsk Monitor

sanic-org/sanic

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

16.0 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for sanic-org/sanic, a Python project with 18,638 GitHub stars. SynthScan examined 101,089 lines of code across 494 source files, recording 1285 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 16.0 (Elevated 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.

16.0
Adjusted Signal
16.0
Raw Pattern Score
100%
Time Factor
2026-07-29
Last Push
18.6K
Stars
Python
Language
101.1K
Lines of Code
494
Files
1.3K
Pattern Hits
2026-10-12
Scan Date
0.19
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 42.1/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 7.2/100 · LOW

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

Agent Over-Engineering Ratio 44.0/100 · MEDIUM

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

PR Review Velocity Impact 58.7/100 · HIGH

Which changes need focused human review? 1285 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 93MEDIUM 19LOW 1173

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 1285 distinct pattern matches across 16 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 Identifiers831 hits · 785 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
LOW⚡tests/test_response.py251def test_chunked_streaming_adds_correct_headers(streaming_app):CODE
LOW⚡tests/test_response.py260def test_chunked_streaming_returns_correct_content(streaming_app):CODE
LOW⚡tests/test_response.py266async def test_chunked_streaming_returns_correct_content_asgi(streaming_app):CODE
LOW⚡tests/test_response.py271def test_non_chunked_streaming_adds_correct_headers(non_chunked_streaming_app):CODE
LOW⚡tests/test_response.py280async def test_non_chunked_streaming_adds_correct_headers_asgi(CODE
LOW⚡tests/test_response.py289def test_non_chunked_streaming_returns_correct_content(CODE
LOW⚡tests/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…
Empty Error Handlers56 hits · 280 pts
SeverityFileLineSnippetContext
HIGHguide/webapp/display/page/page.py115except KeyError:CODE
HIGHguide/webapp/display/page/page.py120except KeyError:CODE
HIGHguide/webapp/display/page/page.py95except KeyError:CODE
HIGHguide/webapp/display/page/page.py100except KeyError:CODE
HIGHguide/webapp/display/page/docobject.py49except ValueError:CODE
HIGHtests/conftest.py142except RouteExists:CODE
HIGHtests/test_server_events.py51except KeyboardInterrupt:CODE
HIGHtests/test_unix_socket.py42except FileNotFoundError:CODE
HIGHtests/test_unix_socket.py46except FileNotFoundError:CODE
HIGHtests/test_unix_socket.py52except FileNotFoundError:CODE
HIGHtests/test_unix_socket.py56except FileNotFoundError:CODE
HIGHtests/test_signals.py598except asyncio.TimeoutError:CODE
HIGHtests/test_motd.py18except KeyError:CODE
HIGHtests/test_prepare.py22except KeyError:CODE
HIGHtests/test_cli.py37except SystemExit:CODE
HIGHtests/test_app.py217except Exception:CODE
HIGHsanic/config.py264except AttributeError:CODE
HIGHsanic/config.py380except ValueError:CODE
HIGHsanic/compat.py31except ImportError:CODE
HIGHsanic/app.py1860except CancelledError:CODE
HIGHsanic/exceptions.py97except AttributeError:CODE
HIGHsanic/headers.py424except (KeyError, IndexError):CODE
HIGHsanic/headers.py467except ValueError:CODE
HIGHsanic/errorpages.py369except BadRequest:CODE
HIGHsanic/mixins/startup.py816except ImportError: # no covCODE
HIGHsanic/mixins/startup.py1439except KeyError:CODE
HIGHsanic/mixins/startup.py1177except OSError:CODE
HIGHsanic/mixins/static.py317except HeaderNotFound:CODE
HIGHsanic/server/runners.py337except (BrokenPipeError, ConnectionResetError, EOFError):CODE
HIGHsanic/server/runners.py202except (RuntimeError, KeyboardInterrupt):CODE
HIGHsanic/server/runners.py217except (NotImplementedError, OSError):CODE
HIGHsanic/server/socket.py55except FileNotFoundError:CODE
HIGHsanic/server/socket.py94except FileNotFoundError:CODE
HIGHsanic/server/websockets/frame.py124except asyncio.TimeoutError:CODE
HIGHsanic/server/websockets/impl.py424except asyncio.CancelledError:CODE
HIGHsanic/server/websockets/impl.py364except Exception:CODE
HIGHsanic/server/websockets/impl.py325except Exception:CODE
HIGHsanic/server/websockets/impl.py419except RuntimeError:CODE
HIGHsanic/server/websockets/impl.py454except asyncio.CancelledError:CODE
HIGHsanic/server/protocols/http_protocol.py48except ModuleNotFoundError: # no covCODE
HIGHsanic/server/protocols/http_protocol.py61except AttributeError:CODE
HIGHsanic/server/protocols/http_protocol.py163except CancelledError:CODE
HIGHsanic/server/protocols/websocket_protocol.py221except AttributeError:CODE
HIGHsanic/cli/console.py301except (ConnectionResetError, BrokenPipeError):CODE
HIGHsanic/cli/daemon.py108except OSError:CODE
HIGHsanic/request/types.py320except AttributeError:CODE
HIGHsanic/request/types.py381except AttributeError:CODE
HIGHsanic/request/types.py1083except AttributeError:CODE
HIGHsanic/request/types.py632except ValueError:CODE
HIGHsanic/request/types.py542except ValueError:CODE
HIGHsanic/worker/process.py118except (BrokenPipeError, ConnectionResetError, EOFError):CODE
HIGHsanic/worker/process.py122except (KeyError, AttributeError, ProcessLookupError):CODE
HIGHsanic/worker/daemon.py48except OSError:CODE
HIGHsanic/worker/daemon.py55except OSError:CODE
HIGHsanic/worker/daemon.py41except OSError:CODE
HIGHsanic/worker/daemon.py430except OSError:CODE
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