Repository Analysis

aio-libs/aiohttp

Asynchronous HTTP client/server framework for asyncio and Python

23.6 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,531 GitHub stars. SynthScan v2.0 examined 107,189 lines of code across 231 source files, recording 2880 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 23.6 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.6
Adjusted Score
23.6
Raw Score
100%
Time Factor
2026-08-28
Last Push
16.5K
Stars
Python
Language
107.2K
Lines of Code
231
Files
2.9K
Pattern Hits
2026-08-29
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 81LOW 2785

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 2880 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 Identifiers2170 hits · 1676 pts
SeverityFileLineSnippetContext
LOWaiohttp/web_ws.py246 def _handle_ping_pong_exception(self, exc: BaseException) -> None:CODE
LOWaiohttp/web_ws.py586 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.py85def parse_content_disposition(CODE
LOWaiohttp/multipart.py194def content_disposition_filename(CODE
LOWaiohttp/multipart.py553 def _apply_content_transfer_decoding(self, data: bytes) -> bytes:CODE
LOWaiohttp/multipart.py874 async def _read_until_first_boundary(self) -> None:CODE
LOWaiohttp/web_response.py318 def _generate_content_type_header(CODE
LOWaiohttp/client_ws.py222 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.py132class RequestHandler(BaseProtocol, Generic[_Request]):CODE
LOWaiohttp/web_protocol.py525 def _reading_paused_for_msg_queue(self) -> bool:CODE
LOWaiohttp/web_protocol.py538 def _resume_msg_queue_reading(self) -> None:CODE
LOWaiohttp/client.py234async 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.py134def _gen_default_accept_encoding() -> str:CODE
LOWaiohttp/client_reqrep.py691 async def _on_chunk_response_received(self, chunk: bytes) -> None:CODE
LOWaiohttp/client_reqrep.py1231 def _update_transfer_encoding(self) -> None:CODE
LOWaiohttp/connector.py632 def _update_proxy_auth_header_and_build_proxy_req(CODE
LOWaiohttp/connector.py715 async def _wait_for_available_connection(CODE
LOWaiohttp/connector.py1228 async def _resolve_host_with_throttle(CODE
LOWaiohttp/connector.py1504 def _convert_hosts_to_addr_infos(CODE
LOWaiohttp/connector.py1525 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.py435def content_disposition_header(CODE
LOWaiohttp/helpers.py1190def should_remove_content_length(method: str, code: int) -> bool:CODE
LOWaiohttp/http_parser.py1229 def begin_http_chunk_receiving(self) -> None:CODE
LOWaiohttp/abc.py189 def update_cookies_from_headers(CODE
LOWaiohttp/_websocket/writer.py198 def _send_compressed_frame_sync(CODE
LOWaiohttp/_websocket/writer.py226 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
2110 more matches not shown…
Self-Referential Comments70 hits · 222 pts
SeverityFileLineSnippetContext
MEDIUMaiohttp/client_middlewares.py44 # Create a new closure that captures the current stateCOMMENT
MEDIUMaiohttp/resolver.py227 # Create a new resolver and client set for this loop if it doesn't existCOMMENT
MEDIUMaiohttp/connector.py1424 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.py97 # 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.py4747 # Create an async generator of dataCOMMENT
MEDIUMtests/test_client_functional.py5378 # Create a mocked payload to verify close() is calledCOMMENT
MEDIUMtests/test_client_functional.py5408 # Create a mocked payload to verify close() is calledCOMMENT
MEDIUMtests/test_client_functional.py5438 # Create a mocked payload to verify close() is calledCOMMENT
MEDIUMtests/test_client_functional.py5465 # Create a mocked payload to verify close() is calledCOMMENT
MEDIUMtests/test_client_functional.py5606 # Create a new client session with our fake resolverCOMMENT
MEDIUMtests/test_client_functional.py5712 # Create a test fileCOMMENT
MEDIUMtests/test_client_functional.py5777 # Create a test fileCOMMENT
MEDIUMtests/test_client_functional.py5850 # Create a test fileCOMMENT
MEDIUMtests/test_websocket_parser.py46 # This method is overridden to allow for patching in tests.COMMENT
MEDIUMtests/test_websocket_parser.py55 # This method is overridden to allow for patching in tests.COMMENT
MEDIUMtests/test_client_request.py135 # Create a response to test request_infoCOMMENT
MEDIUMtests/test_client_request.py157 # Create a response to test request_infoCOMMENT
MEDIUMtests/test_client_request.py1160 # Create a BytesPayload which has a size propertyCOMMENT
MEDIUMtests/test_client_request.py1183 # Create a payload with a known sizeCOMMENT
MEDIUMtests/test_client_request.py1959 # Create an empty async generatorCOMMENT
MEDIUMtests/test_client_request.py1981 # Create a mock payload that tracks if it was closedCOMMENT
MEDIUMtests/test_client_request.py2104 # Create a mock writer and connectionCOMMENT
MEDIUMtests/test_client_request.py2108 # Create a requestCOMMENT
MEDIUMtests/test_cookie_helpers.py47 # Create a cookie with a coded_value different from valueCOMMENT
MEDIUMtests/test_cookiejar.py1432 # Create a shared cookie (no domain/path restrictions)COMMENT
MEDIUMtests/test_cookiejar.py1560 # 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.py919 # 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.py1354 # 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.py3551 # 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.py1856 # Create a mock BodyPartReaderCOMMENT
MEDIUMtests/test_multipart.py1862 # Create the payloadCOMMENT
MEDIUMtests/test_web_urldispatcher.py280 # 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
MEDIUMtests/test_resolver.py686 # Create a mock resolver that will be None when accessedCOMMENT
10 more matches not shown…
Unused Imports313 hits · 221 pts
SeverityFileLineSnippetContext
LOWaiohttp/multipart.py74CODE
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 Block122 hits · 122 pts
SeverityFileLineSnippetContext
LOW.coveragerc.toml41# NOTE: context.COMMENT
LOW.coveragerc.toml61]COMMENT
LOW.coveragerc-cython.toml41# NOTE: context.COMMENT
LOWsetup.cfg61 ignore:module 'ssl' has no attribute 'OP_NO_COMPRESSION'. The Python interpreter is compiled against OpenSSL < 1.0.0COMMENT
LOWaiohttp/multipart.py1001 # token = 1*tcharCOMMENT
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 if not (compress or self.compress) or opcode >= WS_CONTROL_FRAME_OPCODE:COMMENT
LOWtests/test_web_urldispatcher.py261async def test_follow_symlink_directory_traversal_after_normalization(COMMENT
LOWrequirements/base-ft.txt1#COMMENT
LOWrequirements/base-ft.txt21cffi==2.1.1COMMENT
LOWrequirements/base-ft.txt41pycares==5.0.1COMMENT
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 # sphinxCOMMENT
LOWrequirements/constraints.txt101 # aiohttpCOMMENT
LOWrequirements/constraints.txt121 # viaCOMMENT
LOWrequirements/constraints.txt141 # -r requirements/multidict.inCOMMENT
LOWrequirements/constraints.txt161pathspec==1.1.1COMMENT
LOWrequirements/constraints.txt181 # yarlCOMMENT
LOWrequirements/constraints.txt201pyproject-hooks==1.2.0COMMENT
LOWrequirements/constraints.txt221 # via pytest-aiohttpCOMMENT
LOWrequirements/constraints.txt241 # viaCOMMENT
LOWrequirements/constraints.txt261slotscheck==0.20.1COMMENT
LOWrequirements/constraints.txt281 # via -r requirements/doc.inCOMMENT
LOWrequirements/constraints.txt301 # viaCOMMENT
LOWrequirements/constraints.txt321 # python-on-whalesCOMMENT
LOWrequirements/constraints.txt341 # aiohttpCOMMENT
LOWrequirements/dev.txt1#COMMENT
LOWrequirements/dev.txt21aiosignal==1.4.0COMMENT
LOWrequirements/dev.txt41 # via pytest-asyncioCOMMENT
LOWrequirements/dev.txt61 # via pre-commitCOMMENT
LOWrequirements/dev.txt81 # viaCOMMENT
LOWrequirements/dev.txt101gunicorn==26.2.0COMMENT
LOWrequirements/dev.txt121 # sphinxCOMMENT
LOWrequirements/dev.txt141 # yarlCOMMENT
LOWrequirements/dev.txt161 # via pip-toolsCOMMENT
LOWrequirements/dev.txt181 # -r requirements/lint.inCOMMENT
LOWrequirements/dev.txt201 # viaCOMMENT
LOWrequirements/dev.txt221pytest-cov==7.1.0COMMENT
LOWrequirements/dev.txt241 # myst-parserCOMMENT
LOWrequirements/dev.txt261 # myst-parserCOMMENT
LOWrequirements/dev.txt281 # viaCOMMENT
LOWrequirements/dev.txt301 # aiohttpCOMMENT
LOWrequirements/dev.txt321 # -r requirements/lint.inCOMMENT
LOWrequirements/cython.txt1#COMMENT
LOWrequirements/runtime-deps.txt1#COMMENT
LOWrequirements/runtime-deps.txt21cffi==2.1.1COMMENT
LOWrequirements/runtime-deps.txt41pycparser==3.0COMMENT
LOWrequirements/test-common-base.txt1#COMMENT
LOWrequirements/test-common-base.txt21freezegun==1.5.5COMMENT
LOWrequirements/test-common-base.txt41 # pytestCOMMENT
LOWrequirements/test-common-base.txt61pytest-asyncio==1.4.0COMMENT
62 more matches not shown…
Deep Nesting74 hits · 70 pts
SeverityFileLineSnippetContext
LOWaiohttp/web_ws.py520CODE
LOWaiohttp/web_ws.py611CODE
LOWaiohttp/worker.py69CODE
LOWaiohttp/multipart.py85CODE
LOWaiohttp/multipart.py194CODE
LOWaiohttp/web_response.py260CODE
LOWaiohttp/web_response.py298CODE
LOWaiohttp/web_response.py372CODE
LOWaiohttp/web_response.py542CODE
LOWaiohttp/web_response.py612CODE
LOWaiohttp/web_response.py702CODE
LOWaiohttp/client_ws.py400CODE
LOWaiohttp/web_exceptions.py499CODE
LOWaiohttp/web.py279CODE
LOWaiohttp/web.py426CODE
LOWaiohttp/streams.py468CODE
LOWaiohttp/web_protocol.py471CODE
LOWaiohttp/web_protocol.py667CODE
LOWaiohttp/web_protocol.py824CODE
LOWaiohttp/client.py465CODE
LOWaiohttp/client.py1008CODE
LOWaiohttp/web_request.py346CODE
LOWaiohttp/web_request.py691CODE
LOWaiohttp/web_request.py753CODE
LOWaiohttp/client_proto.py115CODE
LOWaiohttp/web_runner.py319CODE
LOWaiohttp/payload.py122CODE
LOWaiohttp/payload.py1015CODE
LOWaiohttp/formdata.py83CODE
LOWaiohttp/connector.py459CODE
LOWaiohttp/connector.py536CODE
LOWaiohttp/connector.py715CODE
LOWaiohttp/connector.py757CODE
LOWaiohttp/connector.py1416CODE
LOWaiohttp/connector.py1525CODE
LOWaiohttp/connector.py1599CODE
LOWaiohttp/web_fileresponse.py296CODE
LOWaiohttp/_cookie_helpers.py167CODE
LOWaiohttp/_cookie_helpers.py266CODE
LOWaiohttp/helpers.py283CODE
LOWaiohttp/helpers.py435CODE
LOWaiohttp/http_parser.py168CODE
LOWaiohttp/http_parser.py330CODE
LOWaiohttp/http_parser.py656CODE
LOWaiohttp/http_parser.py786CODE
LOWaiohttp/http_parser.py850CODE
LOWaiohttp/http_parser.py914CODE
LOWaiohttp/http_parser.py945CODE
LOWaiohttp/cookiejar.py134CODE
LOWaiohttp/cookiejar.py190CODE
LOWaiohttp/cookiejar.py325CODE
LOWaiohttp/_websocket/writer.py74CODE
LOWaiohttp/_websocket/helpers.py78CODE
LOWaiohttp/_websocket/reader_py.py148CODE
LOWaiohttp/_websocket/reader_py.py245CODE
LOWaiohttp/_websocket/reader_py.py392CODE
LOWtests/test_client_session.py589CODE
LOWtests/test_client_middleware.py288CODE
LOWtests/test_client_middleware.py322CODE
LOWtests/test_client_ws.py489CODE
14 more matches not shown…
Cross-Language Confusion7 hits · 42 pts
SeverityFileLineSnippetContext
HIGHaiohttp/helpers.py939 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.py5588 "av-profile=null; Domain=.amazon.it; "CODE
HIGHtests/test_benchmarks_http_websocket.py76 b'8","result":{"name":null,"id":"shellyplugus-c049ef8c30e4","mac":"C049EF8C30E'CODE
HIGHtests/test_benchmarks_http_websocket.py78 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.py1378 # Check if uvloop is being used, which supports TLS in TLS,COMMENT
LOWaiohttp/connector.py1383 # 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.py300 # 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.py1295 # Write file in executorCOMMENT
LOWtests/test_payload.py1299 # Open file in executorCOMMENT
LOWtests/test_payload.py1360 # Open the file and create payloadCOMMENT
LOWtests/test_payload.py1368 # Read the file (simulating first request)COMMENT
LOWtests/test_payload.py1319 # Write file in executorCOMMENT
LOWtests/test_payload.py1327 # 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 Wrapping26 hits · 28 pts
SeverityFileLineSnippetContext
LOWaiohttp/web_ws.py541 except Exception as exc:CODE
LOWaiohttp/web_ws.py571 except Exception as exc:CODE
LOWaiohttp/web_ws.py656 except Exception as exc:CODE
LOWaiohttp/worker.py137 except Exception:CODE
LOWaiohttp/multipart.py1223 except Exception as exc:CODE
LOWaiohttp/client_ws.py352 except Exception as exc:CODE
LOWaiohttp/client_ws.py370 except Exception as exc:CODE
LOWaiohttp/client_ws.py450 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.py655 except Exception as exc:CODE
LOWaiohttp/web_protocol.py796 except Exception as exc:CODE
LOWaiohttp/client_proto.py150 except Exception as underlying_exc:CODE
LOWaiohttp/client_reqrep.py1520 except Exception as underlying_exc:CODE
LOWaiohttp/web_log.py223 except Exception:CODE
LOWaiohttp/formdata.py142 except Exception as exc:CODE
LOWaiohttp/http_parser.py543 except Exception as underlying_exc:CODE
LOWaiohttp/http_parser.py1206 except Exception:CODE
LOWaiohttp/_websocket/reader_py.py238 except Exception as exc:CODE
LOWtests/test_client_session.py1404 except Exception:CODE
LOWtests/test_web_exceptions.py166 except Exception as exc:CODE
LOWtests/test_web_websocket_functional.py140 except Exception as exc: # pragma: no coverCODE
LOWtests/test_web_websocket_functional.py2076 except Exception as exc: # pragma: no coverCODE
MEDIUMexamples/client_ws.py31 print("Error during receive %s" % ws.exception())CODE
Modern Structural Boilerplate26 hits · 26 pts
SeverityFileLineSnippetContext
LOWaiohttp/web_ws.py258 def _set_closed(self) -> None:CODE
LOWaiohttp/web_ws.py580 def _set_closing(self, code: int) -> None:CODE
LOWaiohttp/web_ws.py586 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.py235 def _set_closed(self) -> None:CODE
LOWaiohttp/client_ws.py243 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.py159def set_zlib_backend(new_zlib_backend: ZLibBackendProtocol) -> None:CODE
LOWaiohttp/payload.py472 def _set_or_restore_start_position(self) -> None:CODE
LOWaiohttp/client_reqrep.py903 def _update_headers(self, headers: CIMultiDict[str]) -> None:CODE
LOWaiohttp/client_reqrep.py1173 def _update_auto_headers(self, skip_auto_headers: Iterable[str] | None) -> None:CODE
LOWaiohttp/client_reqrep.py1192 def _update_cookies(self, cookies: BaseCookie[str]) -> None:CODE
LOWaiohttp/client_reqrep.py1231 def _update_transfer_encoding(self) -> None:CODE
LOWaiohttp/client_reqrep.py1250 def _update_body_from_data(self, body: Any) -> None:CODE
LOWaiohttp/client_reqrep.py1295 def _update_body(self, body: Any) -> None:CODE
LOWaiohttp/client_reqrep.py1312 async def update_body(self, body: Any) -> None:CODE
LOWaiohttp/client_reqrep.py1374 def _update_expect_continue(self, expect: bool = False) -> None:CODE
LOWaiohttp/http_writer.py249 def set_eof(self) -> None:CODE
LOWaiohttp/helpers.py873def set_result(fut: "asyncio.Future[_T]", result: _T) -> None:CODE
LOWaiohttp/http_parser.py640 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.py101CODE
LOWaiohttp/web_response.py740CODE
LOWaiohttp/web_response.py542CODE
LOWaiohttp/test_utils.py562CODE
LOWaiohttp/web.py279CODE
LOWaiohttp/web.py426CODE
LOWaiohttp/web_protocol.py205CODE
LOWaiohttp/client.py294CODE
LOWaiohttp/client.py465CODE
LOWaiohttp/client.py933CODE
LOWaiohttp/client.py1008CODE
LOWaiohttp/client.py1485CODE
LOWaiohttp/client_proto.py229CODE
LOWaiohttp/connector.py995CODE
LOWaiohttp/helpers.py1052CODE
LOWaiohttp/http_parser.py255CODE
LOWaiohttp/http_parser.py850CODE
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.py1962CODE
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.py151 # 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.py1501 # 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