Repository Analysis

aio-libs/aiohttp

Asynchronous HTTP client/server framework for asyncio and Python

23.7 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of aio-libs/aiohttp, a Python project with 16,509 GitHub stars. SynthScan v2.0 examined 103,938 lines of code across 227 source files, recording 2787 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 23.7 places this repository in the Moderate 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).

23.7
Adjusted Score
23.7
Raw Score
100%
Time Factor
2026-07-14
Last Push
16.5K
Stars
Python
Language
103.9K
Lines of Code
227
Files
2.8K
Pattern Hits
2026-07-14
Scan Date
0.06
HC Hit Rate

What These Metrics Mean

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

Score History

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

Severity Breakdown

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

CRITICAL 0HIGH 14MEDIUM 82LOW 2691

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 2787 distinct pattern matches across 20 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 Identifiers2077 hits · 1616 pts
SeverityFileLineSnippetContext
LOWaiohttp/web_ws.py240 def _handle_ping_pong_exception(self, exc: BaseException) -> None:CODE
LOWaiohttp/web_ws.py571 def _set_code_close_transport(self, code: int) -> None:CODE
LOWaiohttp/client_middlewares.py35 async def single_middleware_handler(req: ClientRequest) -> ClientResponse:CODE
LOWaiohttp/multipart.py78def parse_content_disposition(CODE
LOWaiohttp/multipart.py187def content_disposition_filename(CODE
LOWaiohttp/multipart.py529 def _apply_content_transfer_decoding(self, data: bytes) -> bytes:CODE
LOWaiohttp/multipart.py846 async def _read_until_first_boundary(self) -> None:CODE
LOWaiohttp/web_response.py316 def _generate_content_type_header(CODE
LOWaiohttp/client_ws.py213 def _handle_ping_pong_exception(self, exc: BaseException) -> None:CODE
LOWaiohttp/tracing.py136 def on_response_chunk_received(CODE
LOWaiohttp/tracing.py158 def on_connection_queued_start(CODE
LOWaiohttp/tracing.py170 def on_connection_create_start(CODE
LOWaiohttp/tracing.py368 async def send_response_chunk_received(CODE
LOWaiohttp/tracing.py416 async def send_connection_queued_start(self) -> None:CODE
LOWaiohttp/tracing.py421 async def send_connection_queued_end(self) -> None:CODE
LOWaiohttp/tracing.py426 async def send_connection_create_start(self) -> None:CODE
LOWaiohttp/tracing.py431 async def send_connection_create_end(self) -> None:CODE
LOWaiohttp/tracing.py436 async def send_connection_reuseconn(self) -> None:CODE
LOWaiohttp/tracing.py441 async def send_dns_resolvehost_start(self, host: str) -> None:CODE
LOWaiohttp/web_exceptions.py499def _initialize_default_reason() -> None:CODE
LOWaiohttp/web_middlewares.py49def normalize_path_middleware(CODE
LOWaiohttp/streams.py305 def begin_http_chunk_receiving(self) -> None:CODE
LOWaiohttp/web_protocol.py131class RequestHandler(BaseProtocol, Generic[_Request]):CODE
LOWaiohttp/web_protocol.py509 def _reading_paused_for_msg_queue(self) -> bool:CODE
LOWaiohttp/web_protocol.py522 def _resume_msg_queue_reading(self) -> None:CODE
LOWaiohttp/client.py231async def _connect_and_send_request(req: ClientRequest) -> ClientResponse:CODE
LOWaiohttp/web_urldispatcher.py637 def _resolve_path_to_response(self, unresolved_path: Path) -> StreamResponse:CODE
LOWaiohttp/client_proto.py32class ResponseHandler(BaseProtocol, DataQueue[tuple[RawResponseMessage, StreamReader]]):CODE
LOWaiohttp/base_protocol.py80 def _reading_paused_for_msg_queue(self) -> bool:CODE
LOWaiohttp/payload.py472 def _set_or_restore_start_position(self) -> None:CODE
LOWaiohttp/client_reqrep.py132def _gen_default_accept_encoding() -> str:CODE
LOWaiohttp/client_reqrep.py689 async def _on_chunk_response_received(self, chunk: bytes) -> None:CODE
LOWaiohttp/client_reqrep.py1217 def _update_transfer_encoding(self) -> None:CODE
LOWaiohttp/connector.py631 def _update_proxy_auth_header_and_build_proxy_req(CODE
LOWaiohttp/connector.py714 async def _wait_for_available_connection(CODE
LOWaiohttp/connector.py1220 async def _resolve_host_with_throttle(CODE
LOWaiohttp/connector.py1496 def _convert_hosts_to_addr_infos(CODE
LOWaiohttp/connector.py1517 async def _create_direct_connection(CODE
LOWaiohttp/web_fileresponse.py232 def _get_file_path_stat_encoding(CODE
LOWaiohttp/_cookie_helpers.py85def preserve_morsel_with_coded_value(cookie: Morsel[str]) -> Morsel[str]:STRING
LOWaiohttp/http_writer.py132 def _send_headers_with_payload(CODE
LOWaiohttp/helpers.py416def content_disposition_header(CODE
LOWaiohttp/helpers.py1171def should_remove_content_length(method: str, code: int) -> bool:CODE
LOWaiohttp/http_parser.py1193 def begin_http_chunk_receiving(self) -> None:CODE
LOWaiohttp/abc.py189 def update_cookies_from_headers(CODE
LOWaiohttp/_websocket/writer.py190 def _send_compressed_frame_sync(CODE
LOWaiohttp/_websocket/writer.py218 async def _send_compressed_frame_async_locked(CODE
LOWtests/test_connector.py2857async def test_close_cancels_cleanup_handle(key: ConnectionKey) -> None:CODE
LOWtests/test_connector.py2865async def test_close_cancels_resolve_host(make_client_request: _RequestMaker) -> None:CODE
LOWtests/test_connector.py3239async def test_close_cancels_cleanup_closed_handle() -> None:CODE
LOWtests/test_connector.py3246async def test_ctor_with_default_loop() -> None:CODE
LOWtests/test_connector.py3253async def test_base_connector_allows_high_level_protocols() -> None:CODE
LOWtests/test_connector.py3776async def test_limit_per_host_property() -> None:CODE
LOWtests/test_connector.py3783async def test_limit_property_default() -> None:CODE
LOWtests/test_connector.py3789async def test_limit_per_host_property_default() -> None:CODE
LOWtests/test_connector.py3795async def test_force_close_and_explicit_keep_alive() -> None:CODE
LOWtests/test_connector.py4515async def test_connector_does_not_remove_needed_waiters(CODE
LOWtests/test_connector.py4525 async def await_connection_and_check_waiters() -> None:CODE
LOWtests/test_connector.py4533 async def allow_connection_and_add_dummy_waiter() -> None:CODE
LOWtests/test_connector.py170async def test_connection_del_loop_debug() -> None:CODE
2017 more matches not shown…
Self-Referential Comments71 hits · 226 pts
SeverityFileLineSnippetContext
MEDIUMaiohttp/client_middlewares.py44 # Create a new closure that captures the current stateCOMMENT
MEDIUMaiohttp/compression_utils.py297 # Create a fresh decompressor for each subsequent member.COMMENT
MEDIUMaiohttp/resolver.py227 # Create a new resolver and client set for this loop if it doesn't existCOMMENT
MEDIUMaiohttp/connector.py1416 tls_proto = self._factory() # Create a brand new proto for TLSCODE
MEDIUMaiohttp/client_middleware_digest_auth.py357 # Define a dict mapping of header fields to their valuesCOMMENT
MEDIUMaiohttp/_websocket/writer.py96 # Create a task to shield from cancellationCOMMENT
MEDIUMtests/test_connector.py2359 # Create a mock SSL protocolCOMMENT
MEDIUMtests/test_connector.py2389 # Create a mock non-SSL protocolCOMMENT
MEDIUMtests/test_connector.py4739 # Create a connect tunnel connectionCOMMENT
MEDIUMtests/test_client_functional.py694 # Create a BytesPayload directly - this ensures we test the pathCOMMENT
MEDIUMtests/test_client_functional.py773 # Create a streaming response that continuously sends dataCOMMENT
MEDIUMtests/test_client_functional.py796 # Create a background task that continuously reads dataCOMMENT
MEDIUMtests/test_client_functional.py2497 # Create a highly compressible payload.COMMENT
MEDIUMtests/test_client_functional.py2529 # Create a highly compressible payloadCOMMENT
MEDIUMtests/test_client_functional.py2560 # Create a highly compressible payload.COMMENT
MEDIUMtests/test_client_functional.py4702 # Create an async generator of dataCOMMENT
MEDIUMtests/test_client_functional.py5333 # Create a mocked payload to verify close() is calledCOMMENT
MEDIUMtests/test_client_functional.py5363 # Create a mocked payload to verify close() is calledCOMMENT
MEDIUMtests/test_client_functional.py5393 # Create a mocked payload to verify close() is calledCOMMENT
MEDIUMtests/test_client_functional.py5420 # Create a mocked payload to verify close() is calledCOMMENT
MEDIUMtests/test_client_functional.py5561 # Create a new client session with our fake resolverCOMMENT
MEDIUMtests/test_client_functional.py5667 # Create a test fileCOMMENT
MEDIUMtests/test_client_functional.py5732 # Create a test fileCOMMENT
MEDIUMtests/test_client_functional.py5805 # Create a test fileCOMMENT
MEDIUMtests/test_websocket_parser.py39 # This method is overridden to allow for patching in tests.COMMENT
MEDIUMtests/test_websocket_parser.py48 # This method is overridden to allow for patching in tests.COMMENT
MEDIUMtests/test_client_request.py129 # Create a response to test request_infoCOMMENT
MEDIUMtests/test_client_request.py151 # Create a response to test request_infoCOMMENT
MEDIUMtests/test_client_request.py1143 # Create a BytesPayload which has a size propertyCOMMENT
MEDIUMtests/test_client_request.py1166 # Create a payload with a known sizeCOMMENT
MEDIUMtests/test_client_request.py1942 # Create an empty async generatorCOMMENT
MEDIUMtests/test_client_request.py1964 # Create a mock payload that tracks if it was closedCOMMENT
MEDIUMtests/test_client_request.py2087 # Create a mock writer and connectionCOMMENT
MEDIUMtests/test_client_request.py2091 # Create a requestCOMMENT
MEDIUMtests/test_cookie_helpers.py48 # Create a cookie with a coded_value different from valueCOMMENT
MEDIUMtests/test_cookiejar.py1426 # Create a shared cookie (no domain/path restrictions)COMMENT
MEDIUMtests/test_cookiejar.py1554 # Create a truly shared cookieCOMMENT
MEDIUMtests/test_client_middleware_digest_auth.py269 # Create a modified challenge with an unsupported algorithmCOMMENT
MEDIUMtests/test_client_middleware_digest_auth.py285 # Create a challenge with the specific algorithm caseCOMMENT
MEDIUMtests/test_client_middleware_digest_auth.py254 # Create a modified challenge with the test algorithmCOMMENT
MEDIUMtests/test_client_middleware_digest_auth.py305 # Create a challenge with the specific algorithm caseCOMMENT
MEDIUMtests/test_client_middleware_digest_auth.py405 # Create the auth objectCOMMENT
MEDIUMtests/test_client_middleware_digest_auth.py891 # Create a session that uses the digest auth middlewareCOMMENT
MEDIUMtests/test_client_response.py1759 # Create a SimpleCookie with some cookiesCOMMENT
MEDIUMtests/test_client_middleware.py877 # Create a simple server for the allowed requestCOMMENT
MEDIUMtests/test_client_middleware.py1018 # Create main serverCOMMENT
MEDIUMtests/test_client_middleware.py1087 # Create main serverCOMMENT
MEDIUMtests/test_payload.py1327 # Create a test file with known contentCOMMENT
MEDIUMtests/test_payload.py374 # Create a large file that's multiple times larger than DEFAULT_CHUNK_SIZECOMMENT
MEDIUMtests/test_payload.py418 # Create a custom file-like object that tracks read sizesCOMMENT
MEDIUMtests/test_payload.py448 # Create a large text file that's multiple times larger than DEFAULT_CHUNK_SIZECOMMENT
MEDIUMtests/test_payload.py493 # Create a custom file-like object that tracks read sizesCOMMENT
MEDIUMtests/test_http_parser.py3165 # Create a large payload (3MiB) that compresses wellCOMMENT
MEDIUMtests/test_proxy_functional.py1026 # Create a minimal proxy serverCOMMENT
MEDIUMtests/test_client_proto.py356 # Create a mock transportCOMMENT
MEDIUMtests/test_multipart.py1738 # Create a mock BodyPartReaderCOMMENT
MEDIUMtests/test_multipart.py1744 # Create the payloadCOMMENT
MEDIUMtests/test_web_urldispatcher.py276 # This file is below the symlink target and should not be reachableCOMMENT
MEDIUMtests/test_resolver.py549 # Create a second manager and check it's the same instanceCOMMENT
MEDIUMtests/test_resolver.py566 # Create a mock AsyncResolver for testingCOMMENT
11 more matches not shown…
Unused Imports313 hits · 221 pts
SeverityFileLineSnippetContext
LOWaiohttp/multipart.py67CODE
LOWaiohttp/web_response.py1CODE
LOWaiohttp/web_response.py49CODE
LOWaiohttp/test_utils.py19CODE
LOWaiohttp/tracing.py5CODE
LOWaiohttp/tracing.py12CODE
LOWaiohttp/web_middlewares.py21CODE
LOWaiohttp/web.py14CODE
LOWaiohttp/web.py14CODE
LOWaiohttp/web.py14CODE
LOWaiohttp/web.py17CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
LOWaiohttp/web.py18CODE
253 more matches not shown…
Over-Commented Block125 hits · 124 pts
SeverityFileLineSnippetContext
LOWsetup.cfg61# 2-minute per-test timeout so a hung test surfaces by name instead of takingCOMMENT
LOWsetup.cfg81 ignore:path is deprecated. Use files.. instead. Refer to https.//importlib-resources.readthedocs.io/en/latest/using.COMMENT
LOWaiohttp/multipart.py961 """Wrap boundary parameter value in quotes, if necessary.COMMENT
LOWaiohttp/streams.py321 # the body transfer. Each offset is the offset of the end of a chunk.COMMENT
LOWaiohttp/web_urldispatcher.py981COMMENT
LOWaiohttp/client_middleware_digest_auth.py61 # +--||--|--|----|------|---|---||-----|-> maybe whitespaceCOMMENT
LOWaiohttp/web_fileresponse.py321 except ValueError:COMMENT
LOWaiohttp/web_fileresponse.py341 # if Range:bytes=-1000 in request header but file sizeCOMMENT
LOWaiohttp/web_fileresponse.py361 # If a valid byte-range-set includes at least oneCOMMENT
LOWaiohttp/_websocket/writer.py81 # Non-compressed frames don't need lock or shieldCOMMENT
LOWtests/test_web_urldispatcher.py261) -> None:COMMENT
LOWrequirements/base-ft.txt1#COMMENT
LOWrequirements/base-ft.txt21cffi==2.1.0COMMENT
LOWrequirements/base-ft.txt41 # -r requirements/runtime-deps.inCOMMENT
LOWrequirements/multidict.txt1#COMMENT
LOWrequirements/constraints.txt1#COMMENT
LOWrequirements/constraints.txt21aiosignal==1.4.0COMMENT
LOWrequirements/constraints.txt41 # via pytest-asyncioCOMMENT
LOWrequirements/constraints.txt61 # via pre-commitCOMMENT
LOWrequirements/constraints.txt81 # myst-parserCOMMENT
LOWrequirements/constraints.txt101 # -r requirements/runtime-deps.inCOMMENT
LOWrequirements/constraints.txt121jinja2==3.1.6COMMENT
LOWrequirements/constraints.txt141 # viaCOMMENT
LOWrequirements/constraints.txt161 # sphinxCOMMENT
LOWrequirements/constraints.txt181propcache==0.5.2COMMENT
LOWrequirements/constraints.txt201 # viaCOMMENT
LOWrequirements/constraints.txt221 # viaCOMMENT
LOWrequirements/constraints.txt241 # via freezegunCOMMENT
LOWrequirements/constraints.txt261setuptools-git==1.2COMMENT
LOWrequirements/constraints.txt281 # via sphinxCOMMENT
LOWrequirements/constraints.txt301 # slotscheckCOMMENT
LOWrequirements/constraints.txt321 # pydanticCOMMENT
LOWrequirements/constraints.txt341wheel==0.47.0COMMENT
LOWrequirements/dev.txt1#COMMENT
LOWrequirements/dev.txt21aiosignal==1.4.0COMMENT
LOWrequirements/dev.txt41 # via pytest-asyncioCOMMENT
LOWrequirements/dev.txt61 # via pre-commitCOMMENT
LOWrequirements/dev.txt81exceptiongroup==1.3.1COMMENT
LOWrequirements/dev.txt101 # aiosignalCOMMENT
LOWrequirements/dev.txt121 # myst-parserCOMMENT
LOWrequirements/dev.txt141 # aiohttpCOMMENT
LOWrequirements/dev.txt161 # via mypyCOMMENT
LOWrequirements/dev.txt181 # aiohttpCOMMENT
LOWrequirements/dev.txt201 # viaCOMMENT
LOWrequirements/dev.txt221pytest-codspeed==5.0.3COMMENT
LOWrequirements/dev.txt241 # -r requirements/lint.inCOMMENT
LOWrequirements/dev.txt261 # via sphinxCOMMENT
LOWrequirements/dev.txt281 # via sphinxCOMMENT
LOWrequirements/dev.txt301 # -r requirements/test-common.inCOMMENT
LOWrequirements/dev.txt321uvloop==0.22.1 ; platform_system != "Windows" and implementation_name == "cpython"COMMENT
LOWrequirements/cython.txt1#COMMENT
LOWrequirements/runtime-deps.txt1#COMMENT
LOWrequirements/runtime-deps.txt21cffi==2.1.0COMMENT
LOWrequirements/runtime-deps.txt41pycparser==3.0COMMENT
LOWrequirements/test-common-base.txt1#COMMENT
LOWrequirements/test-common-base.txt21exceptiongroup==1.3.1COMMENT
LOWrequirements/test-common-base.txt41pluggy==1.6.0COMMENT
LOWrequirements/test-common-base.txt61pytest-aiohttp==1.1.1COMMENT
LOWrequirements/test-common-base.txt81typing-extensions==4.16.0COMMENT
LOWrequirements/doc.txt1#COMMENT
65 more matches not shown…
Deep Nesting71 hits · 66 pts
SeverityFileLineSnippetContext
LOWaiohttp/web_ws.py596CODE
LOWaiohttp/worker.py69CODE
LOWaiohttp/multipart.py78CODE
LOWaiohttp/multipart.py187CODE
LOWaiohttp/web_response.py260CODE
LOWaiohttp/web_response.py296CODE
LOWaiohttp/web_response.py370CODE
LOWaiohttp/web_response.py539CODE
LOWaiohttp/web_response.py609CODE
LOWaiohttp/web_response.py699CODE
LOWaiohttp/client_ws.py384CODE
LOWaiohttp/web_exceptions.py499CODE
LOWaiohttp/web.py279CODE
LOWaiohttp/web.py426CODE
LOWaiohttp/streams.py468CODE
LOWaiohttp/web_protocol.py460CODE
LOWaiohttp/web_protocol.py647CODE
LOWaiohttp/client.py462CODE
LOWaiohttp/client.py997CODE
LOWaiohttp/web_request.py317CODE
LOWaiohttp/web_request.py639CODE
LOWaiohttp/web_request.py701CODE
LOWaiohttp/client_proto.py115CODE
LOWaiohttp/web_runner.py319CODE
LOWaiohttp/payload.py122CODE
LOWaiohttp/payload.py1015CODE
LOWaiohttp/formdata.py83CODE
LOWaiohttp/connector.py458CODE
LOWaiohttp/connector.py535CODE
LOWaiohttp/connector.py714CODE
LOWaiohttp/connector.py756CODE
LOWaiohttp/connector.py1408CODE
LOWaiohttp/connector.py1517CODE
LOWaiohttp/connector.py1591CODE
LOWaiohttp/web_fileresponse.py296CODE
LOWaiohttp/_cookie_helpers.py167CODE
LOWaiohttp/_cookie_helpers.py266CODE
LOWaiohttp/helpers.py264CODE
LOWaiohttp/helpers.py416CODE
LOWaiohttp/http_parser.py167CODE
LOWaiohttp/http_parser.py329CODE
LOWaiohttp/http_parser.py648CODE
LOWaiohttp/http_parser.py771CODE
LOWaiohttp/http_parser.py835CODE
LOWaiohttp/http_parser.py921CODE
LOWaiohttp/cookiejar.py132CODE
LOWaiohttp/cookiejar.py188CODE
LOWaiohttp/cookiejar.py323CODE
LOWaiohttp/_websocket/helpers.py78CODE
LOWaiohttp/_websocket/reader_py.py194CODE
LOWaiohttp/_websocket/reader_py.py335CODE
LOWaiohttp/_websocket/reader_c.py194CODE
LOWaiohttp/_websocket/reader_c.py335CODE
LOWtests/test_client_session.py589CODE
LOWtests/test_client_middleware.py288CODE
LOWtests/test_client_middleware.py322CODE
LOWtests/test_client_ws.py489CODE
LOWtests/test_client_ws.py523CODE
LOWtests/test_client_ws.py555CODE
LOWtests/test_proxy.py228CODE
11 more matches not shown…
Cross-Language Confusion7 hits · 38 pts
SeverityFileLineSnippetContext
HIGHaiohttp/helpers.py920 self._name = module + "." + name # type: ignore[possibly-undefined]CODE
HIGHtests/test_benchmarks_web_fileresponse.py199 return resp # type: ignore[possibly-undefined]CODE
HIGHtests/test_client_functional.py5543 "av-profile=null; Domain=.amazon.it; "CODE
HIGHtests/test_benchmarks_http_websocket.py58 b'8","result":{"name":null,"id":"shellyplugus-c049ef8c30e4","mac":"C049EF8C30E'CODE
HIGHtests/test_benchmarks_http_websocket.py60 b'4b5d4f","ver":"1.1.0","app":"PlugUS","auth_en":false,"auth_domain":null}}'CODE
HIGHdocs/code/client_middleware_cookbook.py32 return resp # type: ignore[possibly-undefined]CODE
HIGHdocs/code/client_middleware_cookbook.py69 return resp # type: ignore[possibly-undefined]CODE
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHtests/test_client_middleware.py0middleware that retries failed requests with exponential backoff.STRING
HIGHexamples/combined_middleware.py0middleware that retries failed requests with exponential backoff.STRING
HIGHexamples/retry_middleware.py0middleware that retries failed requests with exponential backoff.STRING
HIGHexamples/web_srv.py0\ type {url}/hello/john {url}/simple or {url}/change_body in browser url barSTRING
HIGHexamples/web_srv_route_table.py0\ type {url}/hello/john {url}/simple or {url}/change_body in browser url barSTRING
HIGHexamples/web_srv_route_deco.py0\ type {url}/hello/john {url}/simple or {url}/change_body in browser url barSTRING
Redundant / Tautological Comments18 hits · 28 pts
SeverityFileLineSnippetContext
LOWaiohttp/payload.py624 # Check if we're done writingCOMMENT
LOWaiohttp/connector.py1370 # Check if uvloop is being used, which supports TLS in TLS,COMMENT
LOWaiohttp/connector.py1375 # Check if aiofastnet is being used, which supports TLS in TLSCOMMENT
LOWaiohttp/client_middleware_digest_auth.py398 # Check if request starts with space URLCOMMENT
LOWaiohttp/client_middleware_digest_auth.py501 # Check if we need to authenticateCOMMENT
LOWaiohttp/cookiejar.py298 # Check if the cookie hasn't been re-added to the heapCOMMENT
LOWtests/test_client_middleware.py409 # Check if token needs refreshCOMMENT
LOWtests/test_payload.py1268 # Write file in executorCOMMENT
LOWtests/test_payload.py1272 # Open file in executorCOMMENT
LOWtests/test_payload.py1333 # Open the file and create payloadCOMMENT
LOWtests/test_payload.py1341 # Read the file (simulating first request)COMMENT
LOWtests/test_payload.py1292 # Write file in executorCOMMENT
LOWtests/test_payload.py1300 # Open file in executorCOMMENT
LOWexamples/token_refresh_middleware.py53 # Check if another coroutine already refreshed the tokenCOMMENT
LOWexamples/token_refresh_middleware.py203 # Check if token exists and is not expiredCOMMENT
LOWexamples/basic_auth_middleware.py68 # Check if Authorization header is presentCOMMENT
LOWexamples/combined_middleware.py140 # Check if we should retryCOMMENT
LOWexamples/retry_middleware.py69 # Check if we should retryCOMMENT
Excessive Try-Catch Wrapping25 hits · 27 pts
SeverityFileLineSnippetContext
LOWaiohttp/web_ws.py530 except Exception as exc:CODE
LOWaiohttp/web_ws.py560 except Exception as exc:CODE
LOWaiohttp/web_ws.py641 except Exception as exc:CODE
LOWaiohttp/worker.py137 except Exception:CODE
LOWaiohttp/multipart.py1190 except Exception as exc:CODE
LOWaiohttp/client_ws.py340 except Exception as exc:CODE
LOWaiohttp/client_ws.py358 except Exception as exc:CODE
LOWaiohttp/client_ws.py431 except Exception as exc:CODE
LOWaiohttp/streams.py212 except Exception:CODE
LOWaiohttp/streams.py236 except Exception:CODE
LOWaiohttp/streams.py635 except Exception:CODE
MEDIUMaiohttp/streams.py44def __anext__(self) -> _T:CODE
LOWaiohttp/web_protocol.py635 except Exception as exc:CODE
LOWaiohttp/web_protocol.py771 except Exception as exc:CODE
LOWaiohttp/client_proto.py150 except Exception as underlying_exc:CODE
LOWaiohttp/client_reqrep.py1506 except Exception as underlying_exc:CODE
LOWaiohttp/web_log.py223 except Exception:CODE
LOWaiohttp/formdata.py142 except Exception as exc:CODE
LOWaiohttp/http_parser.py535 except Exception as underlying_exc:CODE
LOWaiohttp/http_parser.py1170 except Exception:CODE
LOWaiohttp/_websocket/reader_py.py187 except Exception as exc:CODE
LOWaiohttp/_websocket/reader_c.py187 except Exception as exc:CODE
LOWtests/test_client_session.py1404 except Exception:CODE
LOWtests/test_web_exceptions.py166 except Exception as exc:CODE
MEDIUMexamples/client_ws.py31 print("Error during receive %s" % ws.exception())CODE
Modern Structural Boilerplate26 hits · 26 pts
SeverityFileLineSnippetContext
LOWaiohttp/web_ws.py250 def _set_closed(self) -> None:CODE
LOWaiohttp/web_ws.py565 def _set_closing(self, code: int) -> None:CODE
LOWaiohttp/web_ws.py571 def _set_code_close_transport(self, code: int) -> None:CODE
LOWaiohttp/web_response.py155 def _set_status(self, status: int, reason: str | None) -> None:CODE
LOWaiohttp/client_ws.py224 def _set_closed(self) -> None:CODE
LOWaiohttp/client_ws.py232 def _set_closing(self) -> None:CODE
LOWaiohttp/test_utils.py537 def set_dict(app: Any, key: str, value: Any) -> None:CODE
LOWaiohttp/web_app.py203 def _set_loop(self, loop: asyncio.AbstractEventLoop | None) -> None:CODE
LOWaiohttp/streams.py181 def set_read_chunk_size(self, n: int) -> None:CODE
LOWaiohttp/streams.py653 def set_read_chunk_size(self, n: int) -> None:CODE
LOWaiohttp/compression_utils.py144def set_zlib_backend(new_zlib_backend: ZLibBackendProtocol) -> None:CODE
LOWaiohttp/payload.py472 def _set_or_restore_start_position(self) -> None:CODE
LOWaiohttp/client_reqrep.py901 def _update_headers(self, headers: CIMultiDict[str]) -> None:CODE
LOWaiohttp/client_reqrep.py1159 def _update_auto_headers(self, skip_auto_headers: Iterable[str] | None) -> None:CODE
LOWaiohttp/client_reqrep.py1178 def _update_cookies(self, cookies: BaseCookie[str]) -> None:CODE
LOWaiohttp/client_reqrep.py1217 def _update_transfer_encoding(self) -> None:CODE
LOWaiohttp/client_reqrep.py1236 def _update_body_from_data(self, body: Any) -> None:CODE
LOWaiohttp/client_reqrep.py1281 def _update_body(self, body: Any) -> None:CODE
LOWaiohttp/client_reqrep.py1298 async def update_body(self, body: Any) -> None:CODE
LOWaiohttp/client_reqrep.py1360 def _update_expect_continue(self, expect: bool = False) -> None:CODE
LOWaiohttp/http_writer.py249 def set_eof(self) -> None:CODE
LOWaiohttp/helpers.py854def set_result(fut: "asyncio.Future[_T]", result: _T) -> None:CODE
LOWaiohttp/http_parser.py632 def set_upgraded(self, val: bool) -> None:CODE
LOWtests/test_streams.py656 async def set_err() -> None:CODE
LOWtests/test_streams.py1484 async def set_err() -> None:CODE
LOWdocs/code/client_middleware_cookbook.py98 async def set_token(session: ClientSession, event: asyncio.Event) -> None:CODE
AI Structural Patterns27 hits · 20 pts
SeverityFileLineSnippetContext
LOWaiohttp/web_ws.py99CODE
LOWaiohttp/web_response.py737CODE
LOWaiohttp/web_response.py539CODE
LOWaiohttp/test_utils.py562CODE
LOWaiohttp/web.py279CODE
LOWaiohttp/web.py426CODE
LOWaiohttp/web_protocol.py203CODE
LOWaiohttp/client.py291CODE
LOWaiohttp/client.py462CODE
LOWaiohttp/client.py922CODE
LOWaiohttp/client.py997CODE
LOWaiohttp/client.py1474CODE
LOWaiohttp/client_proto.py229CODE
LOWaiohttp/connector.py994CODE
LOWaiohttp/helpers.py1033CODE
LOWaiohttp/http_parser.py254CODE
LOWaiohttp/http_parser.py835CODE
LOWtests/test_web_sendfile_functional.py1132CODE
LOWtests/test_web_sendfile_functional.py1173CODE
LOWtests/test_websocket_writer.py21CODE
LOWtests/test_client_middleware.py50CODE
LOWtests/test_client_middleware.py114CODE
LOWtests/test_client_middleware.py122CODE
LOWtests/test_client_middleware.py201CODE
LOWtests/test_client_middleware.py675CODE
LOWtests/test_client_middleware.py719CODE
LOWtests/test_client_middleware.py728CODE
Structural Annotation Overuse5 hits · 10 pts
SeverityFileLineSnippetContext
LOWtests/test_client_middleware.py302 # Step 0: No auth, request client IDCOMMENT
LOWtests/test_client_middleware.py309 # Step 1: Has session, request credentialsCOMMENT
LOWtests/test_client_middleware.py316 # Step 2: Has challenge response, authenticateCOMMENT
LOWdocs/code/client_middleware_cookbook.py124 # WARNING: This is a simplified example for demonstration purposes only.COMMENT
LOWdocs/code/client_middleware_cookbook.py140 # WARNING: This is a simplified example - should also check ::1, private ranges, etc.COMMENT
Dead Code4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_web_app.py342CODE
MEDIUMtests/test_client_request.py1945CODE
MEDIUMtests/test_run_app.py177CODE
MEDIUMtests/test_run_app.py1132CODE
Verbosity Indicators3 hits · 7 pts
SeverityFileLineSnippetContext
LOWtests/test_client_middleware.py302 # Step 0: No auth, request client IDCOMMENT
LOWtests/test_client_middleware.py309 # Step 1: Has session, request credentialsCOMMENT
LOWtests/test_client_middleware.py316 # Step 2: Has challenge response, authenticateCOMMENT
AI Slop Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
LOWaiohttp/compression_utils.py136 # Everything not explicitly listed in the Protocol we just pass throughCOMMENT
MEDIUMtests/test_connector.py2869 """Delay resolve() task in order to test cancellation."""STRING
MEDIUMtests/test_client_ws_functional.py1401 # The test harness will cleanup the unclosed websocketCOMMENT
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHaiohttp/client_middleware_digest_auth.py225 Build digest authorization header for the current challenge. Args: method: The HTTP methodSTRING
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMdocs/code/client_middleware_cookbook.py124 # WARNING: This is a simplified example for demonstration purposes only.COMMENT
MEDIUMexamples/token_refresh_middleware.py13Note: This is a simplified example for demonstration purposes.STRING
Decorative Section Separators1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMdocs/conf.py410# -------------------------------------------------------------------------COMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWaiohttp/web_urldispatcher.py359 # TODO: implement all abstract methodsCOMMENT
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWexamples/fake_server.py73 return web.json_response({"name": "John Doe", "id": "12345678901234567"})CODE