Repository Analysis

psf/requests

A simple, yet elegant, HTTP library.

18.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of psf/requests, a Python project with 54,141 GitHub stars. SynthScan v2.0 examined 15,292 lines of code across 68 source files, recording 330 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 18.5 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).

18.5
Adjusted Score
18.5
Raw Score
100%
Time Factor
2026-07-09
Last Push
54.1K
Stars
Python
Language
15.3K
Lines of Code
68
Files
330
Pattern Hits
2026-07-14
Scan Date
0.01
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 1MEDIUM 7LOW 322

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 330 distinct pattern matches across 12 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 Identifiers197 hits · 145 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py66 def test_super_len_correctly_calculates_len_of_partially_read_file(self):CODE
LOWtests/test_utils.py73 def test_super_len_handles_files_raising_weird_errors_in_tell(self, error):CODE
LOWtests/test_utils.py86 def test_super_len_tell_ioerror(self, error):CODE
LOWtests/test_utils.py127 def test_super_len_with__len__(self):CODE
LOWtests/test_utils.py132 def test_super_len_with_no__len__(self):CODE
LOWtests/test_utils.py145 def test_super_len_with_fileno(self):CODE
LOWtests/test_utils.py151 def test_super_len_with_no_matches(self):CODE
LOWtests/test_utils.py165 def test_not_vulnerable_to_bad_url_parsing(self, tmp_path, monkeypatch):CODE
LOWtests/test_utils.py173 def test_empty_default_credentials_ignored(self, tmp_path, monkeypatch):CODE
LOWtests/test_utils.py263 def test_bypass_no_proxy_keyword(self, url):CODE
LOWtests/test_utils.py277 def test_not_bypass_no_proxy_keyword(self, url, monkeypatch):CODE
LOWtests/test_utils.py325 def test_guess_filename_invalid(self, value):CODE
LOWtests/test_utils.py335 def test_guess_filename_valid(self, value, expected_type):CODE
LOWtests/test_utils.py352 def test_unzipped_paths_unchanged(self, path):CODE
LOWtests/test_utils.py355 def test_zipped_paths_extracted(self, tmpdir):CODE
LOWtests/test_utils.py635def test__parse_content_type_header(value, expected):CODE
LOWtests/test_utils.py654def test_get_encoding_from_headers(value, expected):CODE
LOWtests/test_utils.py713def test_prepend_scheme_if_needed(value, expected):CODE
LOWtests/test_utils.py759def test_should_bypass_proxies(url, expected, monkeypatch):CODE
LOWtests/test_utils.py787def test_should_bypass_proxies_pass_only_hostname(url, expected):CODE
LOWtests/test_utils.py803def test_add_dict_to_cookiejar(cookiejar):CODE
LOWtests/test_utils.py838def test_should_bypass_proxies_no_proxy(url, expected, monkeypatch):CODE
LOWtests/test_utils.py861def test_should_bypass_proxies_no_proxy_domain_boundary(url, expected):CODE
LOWtests/test_utils.py886def test_should_bypass_proxies_win_registry(url, expected, override, monkeypatch):CODE
LOWtests/test_utils.py924def test_should_bypass_proxies_win_registry_bad_values(monkeypatch):CODE
LOWtests/test_utils.py974def test_set_environ_raises_exception():CODE
LOWtests/test_utils.py426 def test_bad_utf_like_encoding(self):STRING
LOWtests/test_utils.py491def test_requote_uri_with_unquoted_percents(uri, expected):STRING
LOWtests/test_packages.py8def test_can_access_idna_attribute():CODE
LOWtests/test_packages.py12def test_can_access_chardet_attribute():CODE
LOWtests/test_testserver.py63 def test_basic_waiting_server(self):CODE
LOWtests/test_testserver.py117 def test_requests_after_timeout_are_not_received(self):CODE
LOWtests/test_testserver.py130 def test_request_recovery_with_bigger_timeout(self):CODE
LOWtests/test_testserver.py144 def test_server_finishes_on_error(self):CODE
LOWtests/test_testserver.py156 def test_server_finishes_when_no_connections(self):CODE
LOWtests/test_requests.py130 def test_no_body_content_length(self, httpbin, method):CODE
LOWtests/test_requests.py135 def test_empty_content_length(self, httpbin, method):CODE
LOWtests/test_requests.py139 def test_override_content_length(self, httpbin):CODE
LOWtests/test_requests.py145 def test_path_is_not_double_encoded(self):CODE
LOWtests/test_requests.py390 def test_cookie_sent_on_redirect(self, httpbin):CODE
LOWtests/test_requests.py396 def test_cookie_removed_on_expire(self, httpbin):CODE
LOWtests/test_requests.py406 def test_cookie_quote_wrapped(self, httpbin):CODE
LOWtests/test_requests.py411 def test_cookie_persists_via_api(self, httpbin):CODE
LOWtests/test_requests.py417 def test_request_cookie_overrides_session_cookie(self, httpbin):CODE
LOWtests/test_requests.py425 def test_request_cookies_not_persisted(self, httpbin):CODE
LOWtests/test_requests.py431 def test_generic_cookiejar_works(self, httpbin):CODE
LOWtests/test_requests.py617 def test_respect_proxy_env_on_send_self_prepared_request(self, httpbin):CODE
LOWtests/test_requests.py624 def test_respect_proxy_env_on_send_session_prepared_request(self, httpbin):CODE
LOWtests/test_requests.py632 def test_respect_proxy_env_on_send_with_redirects(self, httpbin):CODE
LOWtests/test_requests.py641 def test_respect_proxy_env_on_get(self, httpbin):CODE
LOWtests/test_requests.py647 def test_respect_proxy_env_on_request(self, httpbin):CODE
LOWtests/test_requests.py653 def test_proxy_authorization_preserved_on_request(self, httpbin):CODE
LOWtests/test_requests.py1068 def test_urlencoded_get_query_multivalued_param(self, httpbin):CODE
LOWtests/test_requests.py1073 def test_form_encoded_post_query_multivalued_element(self, httpbin):CODE
LOWtests/test_requests.py1080 def test_different_encodings_dont_break_post(self, httpbin):CODE
LOWtests/test_requests.py1757 def test_header_remove_is_case_insensitive(self, httpbin):CODE
LOWtests/test_requests.py1764 def test_params_are_merged_case_sensitive(self, httpbin):CODE
LOWtests/test_requests.py1770 def test_long_authinfo_in_url(self):CODE
LOWtests/test_requests.py1779 def test_header_keys_are_native(self, httpbin):CODE
LOWtests/test_requests.py1887 def test_can_send_objects_with_files(self, httpbin, files):CODE
137 more matches not shown…
Unused Imports83 hits · 70 pts
SeverityFileLineSnippetContext
LOWtests/compat.py4CODE
LOWtests/compat.py6CODE
LOWtests/test_requests.py97CODE
LOWsrc/requests/cookies.py10CODE
LOWsrc/requests/auth.py8CODE
LOWsrc/requests/auth.py25CODE
LOWsrc/requests/sessions.py9CODE
LOWsrc/requests/sessions.py39CODE
LOWsrc/requests/sessions.py48CODE
LOWsrc/requests/_types.py10CODE
LOWsrc/requests/_types.py66CODE
LOWsrc/requests/hooks.py13CODE
LOWsrc/requests/compat.py12CODE
LOWsrc/requests/compat.py81CODE
LOWsrc/requests/compat.py82CODE
LOWsrc/requests/compat.py82CODE
LOWsrc/requests/compat.py82CODE
LOWsrc/requests/compat.py83CODE
LOWsrc/requests/compat.py84CODE
LOWsrc/requests/compat.py85CODE
LOWsrc/requests/compat.py90CODE
LOWsrc/requests/compat.py90CODE
LOWsrc/requests/compat.py90CODE
LOWsrc/requests/compat.py90CODE
LOWsrc/requests/compat.py90CODE
LOWsrc/requests/compat.py90CODE
LOWsrc/requests/compat.py90CODE
LOWsrc/requests/compat.py90CODE
LOWsrc/requests/compat.py90CODE
LOWsrc/requests/compat.py90CODE
LOWsrc/requests/compat.py102CODE
LOWsrc/requests/compat.py102CODE
LOWsrc/requests/compat.py102CODE
LOWsrc/requests/compat.py102CODE
LOWsrc/requests/compat.py102CODE
LOWsrc/requests/compat.py69CODE
LOWsrc/requests/compat.py76CODE
LOWsrc/requests/compat.py78CODE
LOWsrc/requests/compat.py73CODE
LOWsrc/requests/models.py8CODE
LOWsrc/requests/models.py15CODE
LOWsrc/requests/__init__.py41CODE
LOWsrc/requests/__init__.py158CODE
LOWsrc/requests/__init__.py158CODE
LOWsrc/requests/__init__.py159CODE
LOWsrc/requests/__init__.py159CODE
LOWsrc/requests/__init__.py159CODE
LOWsrc/requests/__init__.py159CODE
LOWsrc/requests/__init__.py159CODE
LOWsrc/requests/__init__.py159CODE
LOWsrc/requests/__init__.py159CODE
LOWsrc/requests/__init__.py159CODE
LOWsrc/requests/__init__.py159CODE
LOWsrc/requests/__init__.py171CODE
LOWsrc/requests/__init__.py171CODE
LOWsrc/requests/__init__.py171CODE
LOWsrc/requests/__init__.py171CODE
LOWsrc/requests/__init__.py171CODE
LOWsrc/requests/__init__.py171CODE
LOWsrc/requests/__init__.py171CODE
23 more matches not shown…
Over-Commented Block15 hits · 15 pts
SeverityFileLineSnippetContext
LOWdocs/conf.py1# -*- coding: utf-8 -*-COMMENT
LOWdocs/conf.py61copyright = u"Kenneth Reitz and contributors"COMMENT
LOWdocs/conf.py81# non-false value, then it is used:COMMENT
LOWdocs/conf.py101# If true, sectionauthor and moduleauthor directives will be shown in theCOMMENT
LOWdocs/conf.py141# html_title = NoneCOMMENT
LOWdocs/conf.py201# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.COMMENT
LOWdocs/conf.py221# A dictionary with options for the search language support, empty by default.COMMENT
LOWdocs/conf.py241 # Latex figure (float) alignmentCOMMENT
LOWdocs/conf.py261# latex_show_pagerefs = FalseCOMMENT
LOWdocs/conf.py321# The basename for the epub file. It defaults to the project name.COMMENT
LOWdocs/conf.py341# A unique identification for the text.COMMENT
LOWdocs/conf.py361# The depth of the table of contents in toc.ncx.COMMENT
LOW.github/workflows/codeql-analysis.yml61COMMENT
LOWsrc/requests/sessions.py461 #: :class:`Request <Request>`. The dictionary values may be lists forCOMMENT
LOWsrc/requests/sessions.py481 #: cert file (.pem). If Tuple, ('cert', 'key') pair.COMMENT
Decorative Section Separators4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMsrc/requests/compat.py31# -------------------COMMENT
MEDIUMsrc/requests/compat.py33# -------------------COMMENT
MEDIUMsrc/requests/compat.py87# --------------COMMENT
MEDIUMsrc/requests/compat.py89# --------------COMMENT
Deep Nesting11 hits · 11 pts
SeverityFileLineSnippetContext
LOWsrc/requests/cookies.py604CODE
LOWsrc/requests/cookies.py401CODE
LOWsrc/requests/cookies.py423CODE
LOWsrc/requests/auth.py157CODE
LOWsrc/requests/models.py151CODE
LOWsrc/requests/models.py183CODE
LOWsrc/requests/models.py576CODE
LOWsrc/requests/utils.py160CODE
LOWsrc/requests/utils.py810CODE
LOWsrc/requests/help.py35CODE
LOWsrc/requests/adapters.py634CODE
Cross-Language Confusion1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHtests/test_requests.py3090 '{"responseCode":["706"],"data":null}{"responseCode":["706"],"data":null}',CODE
Fake / Example Data8 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/test_requests.py2836 b"mailto:user@example.org",CODE
LOWtests/test_requests.py2837 "mailto:user@example.org",CODE
LOWtests/test_requests.py2840 "mailto:user@example.org",CODE
LOWtests/test_requests.py2841 "mailto:user@example.org",CODE
LOWtests/test_requests.py2874 b"mailto:user@example.org",CODE
LOWtests/test_requests.py2876 "mailto:user@example.org",CODE
LOWtests/test_requests.py2879 "mailto:user@example.org",CODE
LOWtests/test_requests.py2881 "mailto:user@example.org",CODE
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMdocs/conf.py6# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMsrc/requests/sessions.py622 # Create the Request.COMMENT
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/testserver/server.py139CODE
LOWsrc/requests/sessions.py557CODE
LOWsrc/requests/models.py323CODE
LOWsrc/requests/models.py424CODE
AI Slop Vocabulary3 hits · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/requests/sessions.py757 # Set defaults that the hooks can utilize to ensure they always haveSTRING
LOWsrc/requests/models.py725 # method. To prevent iterating over None, simply use an empty listCOMMENT
LOWsrc/requests/utils.py491 # a UNC path, then just return the value without quotes. Using theSTRING
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/requests/models.py581 # Check if file, fo, generator, iterator.COMMENT
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/requests/cookies.py382 def set_cookie(self, cookie: Cookie, *args: Any, **kwargs: Any) -> None:CODE